Can I insert dome kind of command, so my program stops and launch de debugger?
I know how to stop it with the "pause" button, but I want to stop it in a specific line...
No, but I'll add that on my todo.
IMHO the comnmand doesn't necessarily have to be seen as a command in the source file, but that is probably the easiest way to handle it - alternatives include some kind of marker in the left margin to the left of the line that follows the "breakout" command.
I also love the idea someone posited recently of having lines drawn between matching indentations i.e a vertical line from a "FOR" down to the matching "NEXT" (and from "While" to "Wend", "IF" to "ENDIF" and so on), although that could get messy if the IDE doesn't take strict control over formatting of the source.
Is there a way to "Watch" variables? Somewhere to set a list of variables that, when in debug mode, will constantly display the variable name followed by its value for specific variables? If not I'd love to add that to my "most wanted" list - could save a great number of "DEBUG" statements in some cases.
Isn't this just a breakpoint?
Cheers,
Ian
Yes.
Ah! IN GLBasic it's called Assert (http://www.glbasic.com/xmlhelp.php?lang=en&id=281&action=view)! :)
Thanks Ian
Quote from: Cliff3D on 2010-Oct-14
IMHO the comnmand doesn't necessarily have to be seen as a command in the source file, but that is probably the easiest way to handle it - alternatives include some kind of marker in the left margin to the left of the line that follows the "breakout" command.
I also love the idea someone posited recently of having lines drawn between matching indentations i.e a vertical line from a "FOR" down to the matching "NEXT" (and from "While" to "Wend", "IF" to "ENDIF" and so on), although that could get messy if the IDE doesn't take strict control over formatting of the source.
Is there a way to "Watch" variables? Somewhere to set a list of variables that, when in debug mode, will constantly display the variable name followed by its value for specific variables? If not I'd love to add that to my "most wanted" list - could save a great number of "DEBUG" statements in some cases.
That's was mee tooo :good:
Quote from: Cliff3D on 2010-Oct-14
Yes.
Ah! IN GLBasic it's called Assert (http://www.glbasic.com/xmlhelp.php?lang=en&id=281&action=view)! :)
Thanks Ian
Oh, I will check that, but yesterday I did a test, and it just terminated my program, not halted it.
Using assert, my program just ends, do not enter in debug-motion.
Quote from: ampos on 2010-Oct-14
Can I insert dome kind of command, so my program stops and launch de debugger?
I know how to stop it with the "pause" button, but I want to stop it in a specific line...
Have you tried inserting a break line with F9? You can even put an IF around a line with a breakpoint to only break the program sometimes.
Quote from: Moru on 2010-Oct-15
Quote from: ampos on 2010-Oct-14
Can I insert dome kind of command, so my program stops and launch de debugger?
I know how to stop it with the "pause" button, but I want to stop it in a specific line...
Have you tried inserting a break line with F9? You can even put an IF around a line with a breakpoint to only break the program sometimes.
With F9 you can insert a breakpoint? Will test it. I was inserting a keywait so I can press the pause button :whistle:
Having just tried it... F9 sets a great breakpoint, and your variables are shown in the DEBUG pan el to the right. Lovely! Many thanks.
This is also under "Edit -> Breakpoints" in the menu, with an option to clear them. I originally found out when I missed F8.