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.

Mr. Frobenius
  • 324
  • 2
  • 8
  • 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. – Jan Vlcinsky Mar 03 '15 at 16:47

1 Answers1

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

Delimitry
  • 2,987
  • 4
  • 30
  • 39