Dark Bit Factory & Gravity
PROGRAMMING => Freebasic => Topic started by: rdc on February 09, 2007
-
DebugView (http://www.microsoft.com/technet/sysinternals/utilities/debugview.mspx) is a handy little program to monitor debug information from your program. It works quite well with FreeBasic. It is useful in cases where you don't want to stop the program from executing yet see variable values.
Here is an example of usage in FB:
option explicit
#include once "windows.bi"
'Define debug string
dim DebugOut as String
dim i as integer
For i = 1 to 10
DebugOut = "i: " & str(i)
OutputDebugString DebugOut
Sleep 10
Next
print "Done."
sleep
end
-
Useful. Very useful.
K+
-
FWIW, this also works in C or C++ with devc, and if you're using VisualStudio Express, the output is caught by the debugger and shown in one of the IDE windows.
Very, very handy indeed.
Jim