Developing Applications Running on SAP BTP Using SAP HANA Cloud

Debugging the Node.js Code

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Debug Node.js code using the SAP Business Application Studio debugger

Debugging Node.js code

Watch this video to learn how to attach the debugger.

Enable the Debugger (1 of 2)

You can debug programs directly from the SAP Business Application Studio for SAP HANA. The debugger can be attached to a running Node.js module. After this is done, the debugger will be able to stop program execution at the breakpoints.

To attach the debugger:

  1. Open the debug panel on the left side of the SAP Business Application Studio for SAP HANA by clicking Debug Icon or using the Menu Option RunStart Debugging
  2. Choose the Dropdown box at the top, and choose which node module to which you want to connect the debugger.

Enable the Debugger (2 of 2)

After you have successfully attached the debugger to the Node.js module, you can set breakpoints by selecting the line numbers to the left of the code.

If you execute your application using the applications link in the Run console, the debugger stops when it reaches the breakpoints that you set before.

Use the buttons on top of the debug panel to resume, step over, step in, step out, or deactivate all breakpoints. You can also detach the debugger from your Node.js module.

Debugging Node.js Code

Business Example

Business Example

Save progress to your learning plan by logging in or creating an account