Page 1 of 1

Python debug

Posted: 12.02.2012 18:13
by Boydon
Hello everyone (it's my first post here).

Sorry, but i don't speak russian. :P

What I would like to know is if there is a way to debug python scripts with step by step execution, breakpoints and similar stuff. The bliss point would be to be able to use some external IDE like PyDev or Python Tools for Visual Studio.

Thank you very much.

Re: Python debug

Posted: 12.02.2012 21:20
by Alex
Hello Boydon

http://wiki.xbmc.org/index.php?title=HO ... th_Eclipse - this is an example of remote debugging python plugins for XBMC(Music player). Same techniques can work with Stealth

Re: Python debug

Posted: 13.02.2012 15:12
by Boydon
Alex wrote:Hello Boydon

http://wiki.xbmc.org/index.php?title=HO ... th_Eclipse - this is an example of remote debugging python plugins for XBMC(Music player). Same techniques can work with Stealth
Thank you Alex, I will try. :)

Re: Python debug

Posted: 15.02.2012 11:53
by Boydon
After various attempt the best solution I've found is to copy the pysrc folder somewhere in you stealth script, refernce it in you script and then use the remote dubugger. Is there any better alternative? :)

Also: is there a way do directly develop script in Pydev taking advantage of the auto-complete features?

Thank you very much. :)

Re: Python debug

Posted: 15.02.2012 12:04
by Alex
Boydon wrote:After various attempt the best solution I've found is to copy the pysrc folder somewhere in you stealth script, refernce it in you script and then use the remote dubugger. Is there any better alternative? :)
you can use this http://docs.python.org/library/sys.html#sys.path to set any location for pysrc module
also sys.path can be updated from windows environment variables http://docs.python.org/using/windows.ht ... -variables
Boydon wrote: Also: is there a way do directly develop script in Pydev taking advantage of the auto-complete features?
yes its possible. to make that happen we need a module named stealth and containing empty definitions of all functions. i need to make it

Re: Python debug

Posted: 15.02.2012 13:47
by Boydon
Alex wrote: you can use this http://docs.python.org/library/sys.html#sys.path to set any location for pysrc module
also sys.path can be updated from windows environment variables http://docs.python.org/using/windows.ht ... -variables
I used sys.path.append("/my/path/to/pysrc") ;)
I used a copy cause the standard one is missing the _init__.py Anyway I plan to make a short How-to for other people to use (as soon as I find sometime).
Alex wrote: yes its possible. to make that happen we need a module named stealth and containing empty definitions of all functions. i need to make it
Good point.

Re: Python debug

Posted: 15.02.2012 13:57
by Alex
Boydon wrote: I used sys.path.append("/my/path/to/pysrc")
if you are using windows try \

Re: Python debug

Posted: 15.02.2012 15:22
by Boydon
Alex wrote: if you are using windows try \
It was a sample, forgive my professional bias. :D
What I am really using (without any problem of sort) is "\\".