gotcha / ipdb

Integration of IPython pdb
BSD 3-Clause "New" or "Revised" License
1.85k stars 146 forks source link

Associate commands to ipdb.set_trace #189

Open Ricardo-Koenige opened 4 years ago

Ricardo-Koenige commented 4 years ago

I'm new to ipdb. In my company, this is the debugger. It's helping me a lot with introspection but I'm having an issue: I introduce breakpoints in code with ipdb.set_trace() and I want to set a watch with commands, but the breakpoint set in code doesn't seem to have a breakpoint number, which commands needs. Literally, I type break and the list comes back empty. Is there a way to add code traces to the "official" breakpoint list, or add these commands to the traace in the code?

gotcha commented 4 years ago

I am not fully sure I understand what you try to do. I have never used commands myself. (Thx for introducing it to me) commands is a pdb feature. Have you tried with pdb.set_trace() ?