-
Notifications
You must be signed in to change notification settings - Fork 24
Debugging
Debugging can be enabled by switching your state to generate full debug information and setting the Debugger
property.
state.Options.DebugInfo = MondDebugInfoLevel.Full;
state.Debugger = new MondRemoteDebugger(IPAddress.Loopback, 1597);
Scripts that do not have full debug information will not support debugging with MondRemoteDebugger
.
After setting the state's debugger you can run your scripts normally and open the remote debugger client. If you are debugging remotely or want to use another port you must change the remote address for the client. Open index.htm
and change the address in debugConfig
to your server's address.
After connecting you should see something like this:
If you only see a Break button, click it and it should change to that view. If it doesn't then no debuggable code is running.
The buttons at the top are used to control execution of scripts.
Action | What it does |
---|---|
Break | Pauses execution as soon as possible. |
Continue | Resumes execution of the script. |
Step In | Steps into the next function call in the current statement and pauses. If there are no functions in the current statement it will pause on the next statement. |
Step Over | Steps over the current statement, pausing either on the statement that follows it or, if the current statement was a return , where it returned to. |
Step Out | Steps out of the current function, pausing where it returned to. |
Watch expressions can be added by typing into the textbox below all of the existing watches and pressing enter. They will automatically refresh when pausing.