Debugging a Script
The first script matching the name or wildcard pattern specified in the DebugEnabledScripts registry entry opens in Visual Studio .NET. You can use the commands on the Debug menu. You can also view the data displayed in the various debugging windows, such as the Locals window and the Call Stack window. For more information about debugging with Visual Studio .NET, see Using the Debugger in the Visual Studio .NET documentation.
When debugging MOM scripts, use the following guidelines:
- If the other scripts do not match the DebugEnabledScripts registry key or you press the Step or Go button in the debugger, attaching the debugger locks the thread responsible for running your script until the debugging is complete. A locked script thread will not prevent other scripts from running using other available threads, but it does decrease performance.
- If you must restart the MOM service, first detach the debugger from the MOM process. Reattach the debugger to the new MOM process after it has started. If you do not explicitly detach the debugger, the debugger might not be aware that the service process has stopped.
- If you step through a script that has opened in the debugger until it exits, the debugger will break on the first line of the next script that opens. Press F5 (the Continue command) to complete its execution, unless you want to step through the second script.