[Implemented] Breakpointsupport in Debugger

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

[Implemented] Breakpointsupport in Debugger

Post by BackupUser »

Restored from previous forum. Originally posted by Horst Hammer.

Maybe I am blind?
I cannot find a way to stop the execution on a predefined breakpoint or line.
I really miss this feature, as it is really difficult to start a step by step bug trace, if I cannot stop the execution of the prog at a special point.
Also great would be the support for conditional breakpoints.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.


Use the 'CallDebugger' command inside your source...

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Horst Hammer.

Use the 'CallDebugger' command inside your source...
Thats what I was looking for. Thanks.
Will you integrate this into the debugger?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.
Will you integrate this into the debugger?
What do you mean exactly ?

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

These are the Debugger keywords in PureBasic (already available):

CallDebugger
This invokes the "debugger" and freezes the programme immediately.

DisableDebugger
This will disable the debugger checks on the source code which follow this command.

EnableDebugger
This will enable the debugger checks on the source code which follow this command (if the debugger was previously disabled with DisableDebugger).


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Horst Hammer.

I just mean if you can add a button, to set or unset breakpoints if i am in the editor on the line where the cursor is. PB should then internally set the trap command. As it is standard in debuggers like the Visual Studio and others. It is not an important thing, but it would be comfortable.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

Dear Horst,
note that PureBasic is near the machine.That means it produce fast asssembled code.VisualStudio(esp. VB) did interprete the code while you running it in the IDE.For tracing your code, use the ShowVariables or ShowDebugOutPut /like the Debug.print in VB ) and the Stop/Cont .Ist is a bit others than VB.
But also more powerfull.

Its a long way to the top if you wanna .....CodeGuru
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> Personaly, i dont need or use the debugger -
> but a BASIC keyword like "BREAK" to call the
> debugger and stop program execution would be great.

...and...

> I just mean if you can add a button, to set or unset breakpoints if i am in the
> editor on the line where the cursor is. PB should then internally set the trap
> command.

Both the above is what the CallDebugger command actually does -- try it.


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

I think what Horst need.He wants to Press F9 in the Sourcecode to set a Breakpoint (Like in VB-IDE).Instead of F9, you have to insert the statement
CallDebugger etc...

Its a long way to the top if you wanna .....CodeGuru
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> He wants to Press F9 in the Sourcecode to set a Breakpoint (Like in
> VB-IDE).Instead of F9, you have to insert the statement CallDebugger etc...

I see. Considering that PureBasic uses a text-based editor, as opposed to a
visual one like VB, then I don't think this feature would be added. Maybe
Fred will surprise us though, but I doubt it. He could always use PBToolBox
and have a macro assigned (eg. set /bp to type CallDebugger) to save a bit of
typing... http://www.bowlay.com/pbtoolbox.htm


PB - Registered PureBasic Coder
Post Reply