Question

I have a script I want to debug that has classes and functions that I want to test interactively in the interpreter window of PyScripter. I'd like to be able to do this in debug mode. Is this possible?

Was it helpful?

Solution 2

Apparently, pyscripter does not have this capability.

OTHER TIPS

Look into pdb. You can call your program's main function from within the interpreter, if you want to.

import pdb
def main():
    a, b = 3, 4 # Set some variables.
    d = {1:'a'}
    pdb.set_trace()
    print "All done."

Then, in the interpreter:

>>> from testme import main
>>> main()
>>> p a
3

I believe that pyScripter only allows debugging of single thread applications, and breakpoints only work in an applications main thread. You may need to look at an external debugger like Winpdb.

PyScripter Actually has a built in debugger

Place a breakpoint on the side of the code (little dot on the edge|or| click in the code and push "F5") and then push "F9" to run in debug mode... and the "F8" to step over.

Note: This is PyScripter Specific

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top