Jump to content

OutputDebugString (C++) / Trace.WriteLine (C#)


Recommended Posts

You didn't check the FAQ that's stickied on this thread!

#253174

A2. You can also debug a script on any computer by adding the following code to your script:

AutoItFunc dbg($msg)
    DllCall("kernel32.dll", "none", "OutputDebugString", "str", $msg)
EndFunc

Then, when you need to add a debug line, call it as necessary. Example:

AutoItdbg("The value of Variable 1 at this time is " & $var1)

This debugging is completely transparent to the user, and is only viewable with a program such as DebugView from SysInternals. This method of debugging has the added advantage of being available to the developer in situations where is not acceptable or feasable to install SciTE on a client's unit.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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