Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interactive console using Pydev in Eclipse?

I'm debugging my Python code in Eclipse using the Pydev plugin. I'm able to open a Pydev console and it gives me two options: "Console for currently active editor" and "Python console". However none of them is useful to inspect current variable status after a breakpoint.

For example, the code stopped at a breakpoint and I want to inspect an "action" variable using the console. However my variables are not available. How can I do things like "dir(action)", etc? (even if it is not using a console).

like image 869
ricafeal Avatar asked Nov 07 '08 09:11

ricafeal


People also ask

How do I use PyDev console?

To use it, do Ctrl+Alt+Enter (while in the PyDev editor) to: Open a console if there's no open console. Make an runfile of the current editor in the console (if no text is selected), so that its symbols are available for further experimentation.

How do I open the Python console in Eclipse?

What you want to use is the interactive console in PyDev (not the regular output when you do a run). To use it do: Ctrl + Alt + Enter .

What is Eclipse PyDev?

PyDev is a plugin that enables Eclipse to be used as a Python IDE (supporting also Jython and IronPython).

How do I disable PyDev?

To do it you can go to Window > Preferences > PyDev > builder and disable it.


1 Answers

This feature is documented here:

http://pydev.org/manual_adv_debug_console.html

like image 106
jimmyorr Avatar answered Sep 30 '22 10:09

jimmyorr