Jump to content

Recommended Posts

Posted

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

  • 2 years later...
Posted

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")

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...