Archive talk:Debug Python Scripts with Eclipse

From Official Kodi Wiki
Jump to navigation Jump to search

Thanks for the page. It was very useful for me in the beginning.

Just one comment. For the the pysrc code that came with Eclipse-pydev was not good since XBMC some times passes files to the module with internal naming paths (special://... or Q:/...) and the module would not find them making it impossible to insert breakpoints in such files.

I did a simple modification to the file pydevd_file_utils.py consisting on adding a line to each procedure that had a filename parameter (4 procedures in total). I added a line like


def _NormFile(filename):
    filename = xbmc.translatePath(filename)
    try:
...

of course you need a

import xbmc

in the begening of the module...

I just wanted to note it in case is useful for someone else.

By the way, I'm instally a new devenv based on Eclipse 3.6 and latest versions for pydev. If I get it working I'll leave here the links and steps...

Again,

Thanks.

PS. Sorry but I'm not good with editing wiki... I let that to someone more experienced.