With this feature, you can manually debug your written scripts. Debugging uses Google Chrome debugging tool.
The debugger can be used only in Google Chrome.
Main functions:
- Navigate to your source files
- Set breakpoints (and specify trigger conditions)
- Step over, step in, step out, resume (continue)
- Inspect scopes, variables, object properties
- Hover your mouse over an expression in your source to display its value in a tooltip
- Edit variables and object properties
- Continue to location
- Break on exceptions
- Disable/enable all breakpoints
IMPORTANT: Before you start debugging, make sure you have the same project downloaded to your device as you have in myDESIGNER.
1. To start debugging, click on the main.js script and then on the Debug icon in the main toolbar.
myDESIGNER will open up Window with a link, which you will put then into browser address.
- Note: If your script generates some files, you will find them in the path specified in UserData dir.
2. When you finish debugging, you can simply close the window.
Console Log
For debugging of server-side scripts on mySCADA Compact devices, you can use the Console log, accessible via a web interface of mySCADA Box in the menu SYSTEM and the bookmark STATUS.
The console is accessible through any mySCADA runtime with a telnet connection on the port 11015. The windows users can use a freeware utility Putty (see picture below), and the UNIX users (including MAC) can use a telnet command with a specific port.
Another useful tool for debugging of server-side scripts is to define a function for logging of uncaught exceptions:
process.on('uncaughtException', function (err) {console.log(err); });
This function will log a description of uncaught errors into the console; you can, of course, define any action inside this function.