5

I'm using a interactive graphical Python debugger with ipdb under the hood (Canopy's graphical debugger). The script I am working on has multiple imported modules and several calls to their respective functions. Whenever I attempt a debugging run, execution gets stuck somewhere within a call to an imported module's function (specifically subprocess). My two main questions are:

1) Does running in debug mode slow things down considerably? Is the code not actually stuck, but just running at a painfully slow rate?

2) Is there a way to completely pass over bits of code and run them as if I were not even debugging? I want to prevent the debugger from diving into subprocess and just execute it as if it were a normal run.

I might toss the graphical debugger and do everything from a terminal, but I would like to avoid that if I can because the graphical interface is really convenient and saves a lot of typing.

1
  • Your requirements seems a bit contradicting - running python code in a debugger, but preventing the debugger to dive into subprocesses. Hint: to learn, if the debugger slows down too much (I do not expect that), try once running it from terminal and you will see. Commented Mar 3, 2015 at 16:47

1 Answer 1

1
import pdb
a = "aaa"
pdb.set_trace()
b = "bbb"
c = "ccc"
final = a + b + c
print final

Your output when you run the code then it will start debugging and control will stop after a="aaa"

$ python abc.py
(Pdb) p a
'aaa'
(Pdb)

Thanks, Shashi

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

Comments

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.