Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IronPython and pdb.set_trace()

Tags:

ironpython

pdb

Does anyone know if IronPython 2.6 is planned to have support for pdb.set_trace() to enable setting breakpoints in an ironpython module? If not does anyone have a suggestion for accomplishing this without pdb?

like image 281
Mike Gates Avatar asked Nov 22 '09 22:11

Mike Gates


People also ask

What does import pdb pdb Set_trace () do?

It's import pdb; pdb. set_trace() . When execution reaches this point in the program, the program stops and you're dropped into the pdb debugger. Effectively, this is the same as inserting a breakpoint on the line below where we call set_trace() .

What is the use of function pdb Set_trace ()?

To start debugging within the program just insert import pdb, pdb. set_trace() commands. Run your script normally and execution will stop where we have introduced a breakpoint. So basically we are hard coding a breakpoint on a line below where we call set_trace().

What does pdb do in Python?

The module pdb defines an interactive source code debugger for Python programs. It supports setting (conditional) breakpoints and single stepping at the source line level, inspection of stack frames, source code listing, and evaluation of arbitrary Python code in the context of any stack frame.


1 Answers

Yes, IronPython 2.6 supports this. By default this switches on when sys.settrace is called so frames already on the stack above the caller won't be available. But with the -X:Tracing option it's available all the time.

like image 185
Dino Viehland Avatar answered Jan 04 '23 07:01

Dino Viehland