views:

343

answers:

3

I'm using Aptana Studio with Pydev 1.5.3 to debug my Django applications. I use PyDev's remote debugger and some code in manage.py and for most of the time this setup is working successfully- I can set breakpoints, inspect variables and step/continue through my code.

However, I'd like to execute arbitrary code at the breakpoint- the thing I really miss after switching from pdb to Eclipse debugging. There is an interactive console available in debug perspective but it is inactive for me.

So my question- is it possible to set up an interactive console in PyDev with remote debugger which could "inject" code at breakpoint?

A: 

After some digging I discovered that I can use Expressions view to access variables properties and view results of class methods, but that still isn't a complete console at breakpoint though.

fest
A: 

With PyDev 1.5.5 it should be possible:

  1. In "Variables" view, you can right-click on a name, then select "change value".
  2. The console is working as well, albeit a bit tricky.
    It is only for inspection and in a very strange way: you have to input the text in the "Debug server" console, and you will get the output in the "filename" console.
    Note also that you need to press enter twice, leaving an empty line.

While the "empty line" trick is documented, the issue about two different console for input and output is not, and I think it may be a bug.

Roberto Liffredo
A: 

strange, i am using pydev 1.5.6 for remote debugging and I can use the interactive console - i type the cmmand, hit enter, after a while get results back; check your firewall is not blocking anything (if you are sure, the interactive console works in local mode). there is even settings in pydev source code to set how much of stdout should be returned back to client (in chars), it should work

roman
I guess it's time for me to upgrade. Thanks for info, I will check this out.
fest