Having some problems with breakpoints in my python debugger plugin. I can add them with a right click in the margin. But if I click the margin again to toggle it off nothing happens (The DeleteBreakpoint method of the python debugger plugin doesn't get called). I can open the breakpoint dialog and remove the dialogs that way, but the editor doesn't update the change (I can force an update of the editor by switching the active debugger). Any idea what might be the problem here? Suspect I have registered either the plugin or the breakpoints incorrectly...
SVN is here (http://developer.berlios.de/svn/?group_id=7745) or browse the code here (http://svn.berlios.de/wsvn/cbilplugin/trunk/PythonDebugger/?#a5f9c838514349797f0b0b1317bc01c4a) specifically this file (http://svn.berlios.de/wsvn/cbilplugin/trunk/PythonDebugger/PyDebugger.cpp). The best way to see what is going on is to install the plugin and test it out adding/removing breakpoints on a python script.
d'oh! fixed in my SVN (http://svn.berlios.de/wsvn/cbilplugin?manualorder=1&op=comp&compare%5B0%5D=%2Ftrunk&compare_rev%5B0%5D=413&compare%5B1%5D=%2Ftrunk&compare_rev%5B1%5D=414&comparesubmit=Compare+Paths)
Hm, I should have posted a comment, but I don't see it, have I? :(
I didn't see anything. ??? Anyway, problem solved by debugging C::B from C::B with GDB :)
Yeah, because I was too sleepy to post this:
Quote
Change:
bool IsVisibleInEditor()const {return false;}
to
bool IsVisibleInEditor()const {return true;}
You should return false only if the breakpoint is temporary.
Also I don't think you need this code in AddBreakpoint:
for (BPList::iterator itr=m_bplist.begin(); itr!=m_bplist.end(); ++itr)
{
if((*itr)->GetLocation()==file && (*itr)->GetLine()==line)
return cb::shared_ptr<cbBreakpoint>();
}
Quote from: oBFusCATed on April 22, 2013, 08:55:27 PM
Also I don't think you need this code in AddBreakpoint:
for (BPList::iterator itr=m_bplist.begin(); itr!=m_bplist.end(); ++itr)
{
if((*itr)->GetLocation()==file && (*itr)->GetLine()==line)
return cb::shared_ptr<cbBreakpoint>();
}
paranoia (wasn't sure if it was possible to ask to add a breakpoint already added). I will remove. Thanks for looking!
Quote from: dmoore on April 22, 2013, 09:11:07 PM
paranoia (wasn't sure if it was possible to ask to add a breakpoint already added). I will remove. Thanks for looking!
If it happens, then it is a bug upstream...