Debugging executables

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Max.²
Enthusiast
Enthusiast
Posts: 175
Joined: Wed Jul 28, 2004 8:38 am

Debugging executables

Post by Max.² »

I'd like to see an compiler option that allows using debug output in the final executable, using the API call OutputDebugString.

Code: Select all

a=1

debug a
So, with debugger enabled and running from within PB, everything behaves as usual.

Now when you compile it, with the original Debugger option enabled but also having set the new "OutputDebugString" option, the compiler transforms the code to

Code: Select all

a=1

OutputDebugString_ (str(a))
and finally compiles it.

Using Debugview from Sysinternals, one can easily track down troubles in the executable that probably don't show when using the PB debugger.

Nothing important as one is already able to do it manually, but would make a nice feature and some less work.