Disallow breakpoint in lins with no executable command

Working on new editor enhancements?
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Disallow breakpoint in lins with no executable command

Post by Kukulkan »

Hi,

I accidentially try'd to figure out why my debug breakpoint did not work. It needed some time to realize that it does not work on Include or XInclude :? I understand that this are no executable commands that the debugger can get a grab on. But it will be a helpful enhancement to disallow setting a breakpoint in commented lines, empty lines and lines that contain only commands that not work with debugger (like Include or XInclude and, maybe, others).

Kukulkan
freak
PureBasic Team
PureBasic Team
Posts: 5941
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Disallow breakpoint in lins with no executable command

Post by freak »

The breakpoint is always set on the next executable that follows if the current line is not executable.
quidquid Latine dictum sit altum videtur
User avatar
skywalk
Addict
Addict
Posts: 4218
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Disallow breakpoint in lins with no executable command

Post by skywalk »

@freak,
One thing I am confused or annoyed by, is the breakpoint (while in debug mode) is not aligned with the cursor or caret in the IDE?

So, if I decide to turn off the break point with the [F9] key, it actually creates another breakpoint 1 line below the current break. :(

Any chance to align the cursor/caret with the break point?

Thanks.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
freak
PureBasic Team
PureBasic Team
Posts: 5941
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Disallow breakpoint in lins with no executable command

Post by freak »

Then the background color that highlights the line with the cursor in it will hide the highlighting that shows the currently debugged line. This makes it hard to see which line the program is on.
quidquid Latine dictum sit altum videtur
User avatar
skywalk
Addict
Addict
Posts: 4218
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Disallow breakpoint in lins with no executable command

Post by skywalk »

There is still the area between the line numbers and the text for that. :(
Please, this would save constantly backing up the cursor to toggle [F9].
I don't see this behavior in other IDE's I use.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Disallow breakpoint in lins with no executable command

Post by Kukulkan »

Hi,
The breakpoint is always set on the next executable that follows if the current line is not executable.
Not really...

Code: Select all

; a simple loader-file as the main file in purebasic
XInclude "main.pbi" ; <- set breakpoint here, for example
XInclude "tools.pbi"
; file finished
The main.pbi contains the executable code. I can set a breakpoint in one of the XInclude files and nothing happens. The executable runs with no break. It is not good to allow setting a breakpoint in such lines.

Kukulkan
Last edited by Kukulkan on Sat Jul 02, 2011 10:40 am, edited 1 time in total.
User avatar
skywalk
Addict
Addict
Posts: 4218
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Disallow breakpoint in lins with no executable command

Post by skywalk »

I have also noticed different behavior of breakpoints depending on the use of projects.
If not using projects and there is a breakpoint in an include file, the debugger sometimes doesn't step into the include.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply