Debug an Object Event Script
Activity Steps
- In Visual Studio, place a breakpoint on the line required by adding this line of code:Copy
System.Diagnostics.Debugger.Break();
- Start the MineMarket Server and a debug version of the MineMarket Client.
- On the Debug menu, select Attach to Process.
The Attach to Process screen displays.
- In the Available Processes list, select BulkTrak.exe.
- Click Attach.
- Navigate to the object in the MineMarket Client and make changes as required to cause the object event script to run.
Visual Studio loads a file containing the code paused on the breakpoint. The file has a unique name and no edits can be made.
Important: Close the file when finished debugging. Failure to do so can cause problems when Visual Studio is reopened because the file may no longer exist.
- When debugging is complete, remove the System.Diagnostics.Debugger.Break method from the script.
Important: Do not release an object event script containing the debug break line, because this could cause the MineMarket to hang.
- In the Object Events (script editor) in MineMarket, recompile the script and save.