facebook

Debugging Node.js Applications in MyEclipse

Many developers spend half of their time fixing bugs. A powerful debugger is critical to produce a quality web application in a timely manner. That is why our debugger is so valuable, making it easy to debug your Node.js projects.

This page details the debugger in MyEclipse.

Note: You can also use the CodeMix plugin for creating and debugging node.js apps. CodeMix is compatible with MyEclipse 2017 and higher and works with existing Professional or higher licenses. Refer to Debugging in CodeMix for more information. 

Starting the Debugger

Use any of the following methods to start the debugger:

  • Project Explorer—Right-click on the JavaScript file and select Debug as>Standalone Node.js Application; or, select the JavaScript file and click the Debug button dddebugbutton.
  • Debug Configurations—Select Debug Configurations from the Run menu. Select your project from the Standalone JavaScript Application folder and click Debug.

Using the Debug Perspective

The first time the debugger encounters a breakpoint, you are asked to switch to the Debug perspective. Select Remember my decision to avoid this message in the future, and then click Yes. The Debug perspective includes the views you need to effectively debug your code.

debugperspectiveco2
Debug Perspective

Editing Debug Configurations

The first time you debug your application, the debug configuration is automatically created with the default settings. To view the configuration, select Run>Debug Configurations from the menu; or, right-click the JavaScript file and select Debug As>Debug Configurations. Your project displays in the Standalone JavaScript Application folder. You can edit an existing configuration or right-click on the folder and select New to create a new configuration.

cfdebugnodeconfig

Debug Configurations for Node.js projects

Source Map Support

If you are using a tool for transpilation (such as TypeScript or Coffeescript), minification (such as minifyJS or UglifyJS) or bundling (such as Browserify), Source Map Support allows you to easily debug your JavaScript files by allowing the debugger to represent current code execution position in the context of the original file. If you are using source maps, select  Enable support for source maps on Debug Configurations. You will also need to properly configure your processing tool.  Learn more