Debug PyDev + Eclipse - the code does not restart after changing the code in the stop / pause mode

I often take these steps and want to optimize the debugging speed:

  • I set some breakpoints.
  • I am running a Google Appengine application (Python 2.5.2 +).
  • When a breakpoint occurs, I often change the error correction code.
  • After changing the code, you need to test it again, but there is a problem if I change the code in the stop / pause mode, the application does not update using code changes ), which requires a slow reboot.

Does anyone have an idea of ​​what is the main reason for forced reboot after suspension or is it PyDev error / limitation?

+5
source share
1 answer

The way debugging works is not to execute source code line by line. Debugging “compiles” your source into bytecode (.pyc files) and executes them, not your source .

Debugging only keeps track of which part of the .pyc files matches that line of your .py files and displays this information for your convenience, but the .py file itself is not what the debugger uses to run the program.

Therefore, if you modify the source / .py file and you want the debugger to confirm these changes, you need to recompile the .pyc files first.

NTN!

+5
source

All Articles