Debugging Profound.js

Debugging Profound.js

This section covers debugging Profound.js running on your own server or workstation.

Overview

Profound.js runs as a Node.js process, so the standard Node.js debugging tools can be used to set breakpoints in your modules, step through code, and inspect or change field values at runtime.

Debugging is enabled by starting the Profound.js server with the Node.js --inspect switch, and then attaching a debugger to the port it reports. You can use any Node.js debugger you prefer; the pages below walk through the two most common choices.

  • VS Code - Provides a full debugging interface, and can either launch Profound.js for you or attach to a server that is already running (including one running remotely on IBM i).

  • Chrome DevTools - Requires no additional software beyond the Chrome browser, and attaches to a Profound.js server that you have already started in debug mode.