Author Topic: For oBFusCATed... breakpoint issue when with python debugger plugin  (Read 9141 times)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
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 or browse the code  here specifically this file. 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.
« Last Edit: April 22, 2013, 06:31:39 pm by dmoore »

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: For oBFusCATed... breakpoint issue when with python debugger plugin
« Reply #2 on: April 22, 2013, 06:43:06 pm »
Hm, I should have posted a comment, but I don't see it, have I? :(
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: For oBFusCATed... breakpoint issue when with python debugger plugin
« Reply #3 on: April 22, 2013, 08:42:03 pm »
I didn't see anything. ??? Anyway, problem solved by debugging C::B  from C::B with GDB :)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: For oBFusCATed... breakpoint issue when with python debugger plugin
« Reply #4 on: April 22, 2013, 08:55:27 pm »
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:
Code
    for (BPList::iterator itr=m_bplist.begin(); itr!=m_bplist.end(); ++itr)
    {
        if((*itr)->GetLocation()==file && (*itr)->GetLine()==line)
            return cb::shared_ptr<cbBreakpoint>();
    }
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: For oBFusCATed... breakpoint issue when with python debugger plugin
« Reply #5 on: April 22, 2013, 09:11:07 pm »
Also I don't think you need this code in AddBreakpoint:
Code
    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!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: For oBFusCATed... breakpoint issue when with python debugger plugin
« Reply #6 on: April 22, 2013, 09:36:29 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...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]