I used b “classname:function” or “b classname::function”, and those didn’t work. now I use “b linenum” as a workaround.but as I modifiy my code frequently, linenum changes.So how to make a breakpoint on class member function in python?I google it && read the python manual, and there’s no direct answer.thanks!
I used b classname:function or b classname::function, and those didn’t work. now I use
Share
In
pdb, the Python debugger, the breakpoint can be set withafter the class definition has been parsed.
For example,
Setting the breakpoint before parsing the class fails:
but after parsing the class:
setting the breakpoint works: