0

For example, I have opened a Python interpreter, and typed some commands, so there are some variables in the working space. Now I want to debug one python program in THE working space. And after debugging, I want to continue working on the same working space.

Or if someone uses Matlab, you will see what I say is similar to Matlab working environment. Such IDE functions are very useful, rather than I just want to use my old habits.

Right now I am using Eclipse + PyDev. Apparently, its functions are very limited. For example, if I start debugging with PyDev, there is no way to use the former working space. Second, if I stop debugging, there is no way to preserve the debugging working space.

Thanks!

2 Answers 2

1
import pdb; pdb.set_trace()

Sounds like it might be what you're looking for. Read about the built-in debugger here.

Also, you might consider PythonXY because its IDE (Spyder) is extremely similar to Matlab. It does things like automatically imports scientific libraries in its standard interpreters, and it is simple to configure it to dump any completed script into an interpreter session so that you can interact with it after it completes.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. But sorry it seems not what I wanted.
1

Pudb is console-based python debugger.
You can switch between the python interpreter shell and debug mode.
You can run the entire script with the following command:

python -m pudb.run foo.py

1 Comment

Thanks. I take a look. I am not used to such GUI. I hope the GUI is like Eclipse. But Eclipse+PyDev can not preserve one consistent console with both debugging and typing commands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.