You can use Visual Studio Code to debug the node process that is running on the SmartServer IoT.
Opening the SmartServer IoT Firewall Port 9229
The firewall on the SmartServer IoT needs to be opened to accept incoming connections on port 9229.
From a console connection, use the following script to open port 9229:
sudo ufw allow 9229
Enabling Remote Debugging
To enable remote debugging, perform the following steps:
- Launch the application on the SmartServer IoT from a console connection using the following script:
node --inspect=<SmartServer IoT IP Address>:9229 index.js
- Start Visual Studio Code on your local computer and open the driver-framework folder that was transferred to the SmartServer IoT.
Go to Debug -> Add Configuration and change the contents of launch.json as follows:
Change the "address" in launch.json to your SmartServer IoT's IP address.
- Start Debugging in Visual Studio Code, which should attach the debugger to the code running on the SmartServer IoT as shown below: