Jump to content
Sign in to follow this  

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

Recommended Posts


Hey everybody!

Is there a way to call a function that write the debug stream (prints to the DebugView).

Just like OutputDebugString(c++) or Trace.WriteLine(c#) functions.

If not, so any other functions that prints without a MsgBox()


Share this post

Link to post
Share on other sites

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


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)

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.

Share this post

Link to post
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
Sign in to follow this