VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Debug.Print...from an Exe

Duncan Jones  (19 Submissions)   Windows API Call/Explanation   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

Everyone knows how useful Debug.Print can be when debugging a program in the run time environment...but why not make these debug comments available from an executable.
Simply replace Debug.Print with the following, and then when your application is running as an executable you can use a debugger (such as DBMON.EXE, downloadable form MSDN) to see the debug comments as they occur:

API Declarations
Private Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (ByVal lpOutputString As String)
Private Declare Function IsDebuggerPresent Lib "kernel32" () As Long

Rate Debug.Print...from an Exe (4(4 Vote))
Debug.Print...from an Exe.bas

Debug.Print...from an Exe Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters