Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Python debug

Ask for help
Post Reply
Boydon
Neophyte
Neophyte
Posts: 36
Joined: 12.02.2012 18:06

Python debug

Post 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.
Alex
Moderator
Moderator
Posts: 351
Joined: 07.04.2005 4:41

Re: Python debug

Post 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
Новый стелс лежит тут. Стелс это произведение искусства! :)
Boydon
Neophyte
Neophyte
Posts: 36
Joined: 12.02.2012 18:06

Re: Python debug

Post 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. :)
Boydon
Neophyte
Neophyte
Posts: 36
Joined: 12.02.2012 18:06

Re: Python debug

Post 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. :)
Alex
Moderator
Moderator
Posts: 351
Joined: 07.04.2005 4:41

Re: Python debug

Post 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
Новый стелс лежит тут. Стелс это произведение искусства! :)
Boydon
Neophyte
Neophyte
Posts: 36
Joined: 12.02.2012 18:06

Re: Python debug

Post 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.
Alex
Moderator
Moderator
Posts: 351
Joined: 07.04.2005 4:41

Re: Python debug

Post by Alex »

Boydon wrote: I used sys.path.append("/my/path/to/pysrc")
if you are using windows try \
Новый стелс лежит тут. Стелс это произведение искусства! :)
Boydon
Neophyte
Neophyte
Posts: 36
Joined: 12.02.2012 18:06

Re: Python debug

Post 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 "\\".
Post Reply