Tron/Troff for realtime visual debugging

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
ChrisR
Addict
Addict
Posts: 1150
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Tron/Troff for realtime visual debugging

Post by ChrisR »

skywalk wrote:Not gonna lie, Edit and Continue was a timesaver in Visual Studio.
But, PB compiles fast enough to accomplish rapid prototyping.
Definitely curious how emitting C will impact the debug flow.
Yeah, the compilations are really fast on PB, one of the strong points
"Edit and Continue" is a feature that remains interesting and very useful to test special cases.

I used it a lot in my previous job on IBM As400 (or IBM iseries).
It was a big time saver also, to avoid compiling too often. The compilations were placed in a job queue and we had to wait our turn.
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Tron/Troff for realtime visual debugging

Post by freak »

ChrisR wrote:Not related to the step,
I am more interested of being able to change a variable value on a breakpoint to test a special condition.
That is actually possible from the "Debug Output" window. Run the following program and then type "set a = 999" into the field at the bottom of the debug output window and press enter. Then continue the program.

Code: Select all

a = 123

Repeat
  Debug "a = " + a
  CallDebugger
ForEver
It works with more complex assignments as well, i.e. "set myArray(25)\someStructField = someOtherVariable + 1" will work too.

I am not sure why that is not documented :oops:
quidquid Latine dictum sit altum videtur
User avatar
skywalk
Addict
Addict
Posts: 3994
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Tron/Troff for realtime visual debugging

Post by skywalk »

OMG freak!
I stumbled on that like 9 years ago but forgot about it when strings acted badly.

But now I will use that for basic types and within structures.

Thanks!

EDIT: Edit and Continue in Visual Studio and other languages also allows for code changes. But, that requires an intermediate runtime framework. For example, you can change If statements and logical blocks without stopping.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
ChrisR
Addict
Addict
Posts: 1150
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Tron/Troff for realtime visual debugging

Post by ChrisR »

Late to the party, I missed your reply
that' s Great, thanks for the info freak :)
As well as skywalk, I will use it now.
freak wrote:I am not sure why that is not documented :oops:
Yes, it would be nice, it's really useful 8)
Post Reply