tuape 0 Posted December 10, 2004 Hi,Here is a simple one liner that helps me debugging my scripts:$test = "My test debug print" DebugPrint($test) ; Function DebugPrint : Outputs debug strings - use DebugView or similar to catch debug messages Func DebugPrint($debugString) DllCall("kernel32.dll", "none", "OutputDebugString", "str", $debugString) EndFuncYou can catch debug messages with DebugView Share this post Link to post Share on other sites
this-is-me 6 Posted December 10, 2004 Good catch there - If I hadn't already created a debug function, I would definately be looking into this one. Who else would I be? Share this post Link to post Share on other sites
gcriaco 1 Posted May 31, 2007 Hi, Here is a simple one liner that helps me debugging my scripts: $test = "My test debug print" DebugPrint($test) ; Function DebugPrint : Outputs debug strings - use DebugView or similar to catch debug messages Func DebugPrint($debugString) DllCall("kernel32.dll", "none", "OutputDebugString", "str", $debugString) EndFunc You can catch debug messages with DebugView Minor change: Func _dbg($sMsg) If @Compiled Then DllCall("kernel32.dll", "none", "OutputDebugString", "str", $sMsg) Else ConsoleWrite($sMsg & @CRLF) EndIf EndFunc ;==>_dbg ;Example Global Const $bDEBUGIT = True If $bDEBUGIT Then _dbg("Some Text") Share this post Link to post Share on other sites