Auto Debug On Line Help
User Script: Auto Debug System


The OnException event will be called when the debuggee process has an exception.

void OnException(
  LONG dwProcessId,        // The debuggee process ID.
  LONG ExceptionAddress, // The exception address.
  LONG ExceptionCode,    // The exception code.
  LONG ExceptionFlags    // The exception flags.


The debuggee process ID.
Address where the exception occurred.
Reason the exception occurred. This is the code generated by a hardware exception, or the code specified in the RaiseException function for a software-generated exception.
Exception flags. This member can be either zero, indicating a continuable exception, or EXCEPTION_NONCONTINUABLE indicating a noncontinuable exception. Any attempt to continue execution after a noncontinuable exception causes the EXCEPTION_NONCONTINUABLE_EXCEPTION exception.

Return Values

No return value.


VBscript Example:

sub main
  addMenuItem "Save Log", "SaveLogFile"
  addMenuItem "Kill Trace Process", "KillTraceProcess"
  startProcess "Notepad.exe", "c:\a.txt"
end sub

sub SaveLogFile
    MsgBox "Call Save Log File"
    saveLog "c:\aaa.dsf"
end sub

sub KillTraceProcess
    MsgBox "Call Kill Process"
    killProcess false
end sub

sub OnException(dwProcessId, ExceptionAddress, ExceptionCode, ExceptionFlags)
   echo dwProcessId & "  " & ExceptionAddress &"  " & ExceptionCode & "  " & ExceptionFlags
end sub

JavaScript Example:

function main(){
  addMenuItem("Save Log", "SaveLogFile");
  addMenuItem("Kill Trace Process", "KillTraceProcess");

  startProcess("Notepad.exe", "c:\a.txt");

function SaveLogFile(){
    echo("Call Save Log File");

function KillTraceProcess(){
    echo("Call Kill Process");

function OnException(dwProcessId, ExceptionAddress, ExceptionCode, ExceptionFlags)
   echo (dwProcessId + "  " + ExceptionAddress +"  " + ExceptionCode + "  " + ExceptionFlags);


Auto Debug for Windows: Unsupport.
Auto Debug Professional: Requires version 5.0 or later.

See Also

Script Information Overview, Script Events, OnBreakPointEntry,OnBreakPointReturn ,OnProcessEnd

Copyright c 2003-2023, www.autodebug.com All Rights Reserved