;This is an example of using the Windows system debugger
;A free debug viewer can be found at
;http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
;The following debugging is of most use when debugging DLL's,
;or when your beta testers are helping you to debug your programs.
;Big thanks to NoahPhense for mentioning the API function and
;and mentioning where to find Sysinternals debugview program.
;Edit: Updated url, macros instead of procedure, toggles native/api debug string output.
#ApiDebug=#True ;#False to turn off API debugging, #True to activate API debugging
#ApiDebugName$="PB Test"
CompilerIf #ApiDebug=#True
Macro DebugString(debug_text)
OutputDebugString_(#ApiDebugName$+": "+debug_text)
EndMacro
CompilerElse
Macro DebugString(debug_text)
Debug debug_text
EndMacro
CompilerEndIf
;Use the below line wherever you wish to output debug hints/tests in your code.
DebugString("Just Testing!")
;This is an example of using the Windows system debugger
;A free debug viewer can be found at
;http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
;The following debugging is of most use when debugging DLL's,
;or when your beta testers are helping you to debug your programs.
;Big thanks to NoahPhense for mentioning the API function and
;and mentioning where to find Sysinternals debugview program.
#Debug=#True ;#False to turn off debugging, #True to activate debugging
#DebugName="Test"
CompilerIf #Debug=#True
Procedure OutputDebugString(debug_text$)
OutputDebugString_(#DebugName+": "+debug_text$)
EndProcedure
CompilerEndIf
;Use the below line wherever you wish to output debug hints/tests in your code.
CompilerIf #Debug : OutputDebugString("Just Testing!") : CompilerEndIf
Last edited by Rescator on Sat Feb 16, 2013 2:50 pm, edited 1 time in total.