Use the following code:
from pdb import set_trace
def buggy_function():
pass
pass
set_trace() # Break here
pass
pass
if __name__ == "__main__":
buggy_function()
When you run the script with python (not with
pdb
), set_trace
will cause the program to stop at this line and pdb
console will show.BTW: You can do the same trick on MSVC if you write
__asm int 3
No comments:
Post a Comment