Saturday, May 20, 2006

Remote debugging getting smarter

There're 2 things that can get in the way when remote debugging some application (especially if it's in another computer):
- Not being able to find the source code
- Not being able to get the output

So, I've changed the debugger in Pydev to make it smarter to find some file if it does not have a 'direct' corresponding file (so, if in the server you have a file in a path /usr/local/foo, you'll be able to specify that location in your computer -- say c:/projects/foo/ Also, if it has only one file named that way in the workspace, it will open it directly (and if more are available, it will give you a choice over which file to open), and as a last resort, if it is not found in the worskpace, it will allow you to choose a file in the filesystem.

As for getting the output, 2 new parameters were introduced in the settrace function, so that you can specify: pydevd.settrace(stdoutToServer=True, stderrToServer = True). Through that, it will redirect all that goes in stdout and stderr to the debug server. Note that I've done it in such a way that it will still print it in the original stdout and stderr -- so that you don't loose your logging (if you have any).

This will be available for the Pydev Extensions release 1.0.7 (which should come out by monday or tuesday).

-- Fabio

No comments: