Attaching the Debugger to a Script
For troubleshooting serious problems, tracing will not be as reliable or informative as a debugger. You can debug a script response by attaching the Visual Studio .NET debugger to the MOM host process.
Note
Rule responses have a default timeout value of 5 minutes. You can increase the response timeout value to prevent the MOM Host process from restarting while you are debugging a script.
To attach the debugger to the MOM host application on an agent or Management Server:
- Start the Visual Studio .NET integrated development environment.
- On the Tools menu, click Debug Processes.
- In the Name box, type the name of the computer running the scripts.
- In the Available Processes list, select the appropriate instance of MOMHost.exe, and then click Attach. Debug scripts on only one agent at a time.
- In the Attach to Process window, select Script from the list of program types to debug, and then click OK. All other types should be cleared.
- In the Debugged Processes list, select the MOMHost.exe process, click Break, and then click Close to save settings.
- Wait for a script matching the DebugEnabledScripts registry value to run.
To end the debugging session and detach from the MOM service, press Shift+F5.
See Also
Identifying Which MOM Process to Debug | Enabling Script Debugging