tuape Posted December 10, 2004 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
this-is-me Posted December 10, 2004 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?
gcriaco Posted May 31, 2007 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")
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now