News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

For oBFusCATed... breakpoint issue when with python debugger plugin

Started by dmoore, April 22, 2013, 03:53:08 AM

Previous topic - Next topic

dmoore

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.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

dmoore

Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

oBFusCATed

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!]

dmoore

I didn't see anything. ??? Anyway, problem solved by debugging C::B  from C::B with GDB :)
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

oBFusCATed

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>();
    }

(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!]

dmoore

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!
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

oBFusCATed

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...
(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!]