Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Contributions to C::B => Topic started by: olaf888 on April 29, 2016, 01:01:17 am

Title: breakpoints change position
Post by: olaf888 on April 29, 2016, 01:01:17 am
Hello

when I set a breakpoint and change something lines above insert  some lines
the bp goes faster down than the position where I set it.

Where to change the behaviour of breakpoint position or similar ?
Title: Re: breakpoints change position
Post by: oBFusCATed on April 29, 2016, 11:12:27 am
Can you try to explain the problem better?
I'm not sure I understand it from the initial description.
Title: Re: breakpoints change position
Post by: raynebc on April 29, 2016, 04:53:25 pm
I interpreted it as him putting a breakpoint on line #a, but when he inserts a new line above the breakpoint, the breakpoint is moved to line #(a + 2) instead of #(a + 1).  This isn't a problem I've experienced.
Title: Re: breakpoints change position
Post by: olaf888 on April 30, 2016, 12:06:56 pm


ahhh now I see
I have that only when I have splitted view vertically.
This must be a bug.
Title: Re: breakpoints change position
Post by: raynebc on April 30, 2016, 08:47:53 pm
I couldn't reproduce this on the latest nightly build.  I tried having a couple source files in horizontal or vertical split view, but in both scenarios when I placed a breakpoint and inserted a new line above it, the breakpoint moved down only one line (staying applied to the correct line of source code).  How are you inserting lines when this happens?  Is it placing a blank line with Enter, pasting lines of code or something else?
Title: Re: breakpoints change position
Post by: Jenna on April 30, 2016, 09:47:28 pm
Happens here too (Fedora 23) with latest trunk.
If I add a newline with return, the breakpoints moves down one extra line.
It happens only in split mode, no matter, whether it's horizontal or vertical.
Title: Re: breakpoints change position
Post by: raynebc on May 01, 2016, 02:16:46 am
If you're creating the split view just by dragging the source file's tab to the left/right/bottom edge of the program window, then at least this problem doesn't occur in Windows.
Title: Re: breakpoints change position
Post by: Jenna on May 01, 2016, 07:30:04 am
If you're creating the split view just by dragging the source file's tab to the left/right/bottom edge of the program window, then at least this problem doesn't occur in Windows.
That's not a split-view.
Split view means that you split the editor (via context-menu), so you can see two different parts of the same file.

What you did is the side-byside-view, where you can view two (or more) different files at the same time.
Title: Re: breakpoints change position
Post by: Jenna on May 01, 2016, 08:06:01 am
It happens because "OnEditorModified" is called for each control and therefore ShiftBreakpoint is called two times.
No time to dig into a solution at the moment, mybe later today.
Title: Re: breakpoints change position
Post by: oBFusCATed on May 01, 2016, 07:26:50 pm
olaf888:
Can you open a ticket on our project page at sf.net?
This will help us to not forget about this issue.
Title: Re: breakpoints change position
Post by: oBFusCATed on May 05, 2016, 05:07:26 pm
Fixed in rev 10849. Thanks for reporting.