Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section



Column
width50%


Note
titleBefore you start!
The first step is to install Profound.js onto your local machine by using 'npm install profoundjs'. Click here for more detailed installation instructions.



Column
width50%


Info
titlePlease note...
You can and are welcome to use any Node.js debugger you prefer with Profound.js; however, this walk-through illustrates using VS Code, as it is one of the more popular, free, and easy to use debuggers for Node.



VS Code: The What and Why

VS Code is a cross-platform, multi-language code editor. With inline IntelliSense, debugging support for multiple languages, inline git support and an extensible API for plugins, it's the editor that has no boundaries.

...

Written Tutorial

VS Code Debug Setup for Profound.js

For VS Code, you will want to open your Profound.js installation directory in the Explorer. This is so it's easy to navigate and debug through existing source.

...

Once you have your Profound.js server running from VS Code, that means you are now able to debug.


Debugging a Profound.js module

For this example we will debug connect4.js, an example module shipped with Profound.js.

  1. In the VS Code explorer, open 'modules/pjssamples/connect4.js'

  2. When the file is open, set a breakpoint on where you'd like to break the program. You can set a breakpoint by clicking slightly left of the line number you'd like to break on.

  3. Next, start debugging from VS Code and launch the application in your browser using the URL which is shown the debug console.

  4. When the program breaks, VS Code will take focus and the current debugging line of the statement will be highlighted in yellow.


    From here, you are able to step through your module and debug the application.

Video Tutorial