Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pydev: debug in console mode (interactive)?

I'm just starting to use pydev but am fairly experienced with Eclipse.

I can use F11 to debug a file.

I can use Ctrl-Alt-Enter to start a console after running the current file, but it does not seem to respect breakpoints.

Is there a way to start a console (similar to Ctrl-Alt-Enter) in debug mode?

like image 940
Jason S Avatar asked Jun 15 '11 14:06

Jason S


People also ask

What does PyDev debugger do?

The Python debugger is an interactive source code debugger for Python programs. It can set conditional breakpoints and single stepping at the source line level. It also supports inspection of stack frames, source code listing, and evaluation of arbitrary Python code in any stack frame's context.

How do I debug a python console?

To start the debugger from the Python interactive console, we are using run() or runeval(). To continue debugging, enter continue after the ( Pdb ) prompt and press Enter. If you want to know the options we can use in this, then after the ( Pdb ) prompt press the Tab key twice.

What is PyDev used for?

PyDev is a third-party plug-in for Eclipse. It is an Integrated Development Environment (IDE) used for programming in Python supporting code refactoring, graphical debugging, code analysis among other features.

How do I run code in PyDev?

Go to the menu: Alt + R + S + The number of the Run you wish (It can be Python, Jython, unit-test, etc). Note: if you were using unit-tests, you could use: Ctrl+F9 to run the unit-tests from the module (and even selecting which tests should be run -- and if Shift is pressed it's launched in debug mode).


1 Answers

There is another way to have a console in debug mode: start the debug, when reaching your first breakpoint (maybe you will want to add a breakpoint in line 1) the console in the debug perspective is in fact interactive.

Though the console is kind of laggy but it works, more info can be found at : http://pydev.org/manual_adv_debug_console.html

like image 130
lwg643 Avatar answered Sep 20 '22 18:09

lwg643