You can only debug SAP HANA server-side JavaScript with the SAP HANA Tools plugin for Eclipse as of release 7.4. If you are working with lower plugin versions, use the SAP HANA Web-based Development Workbench to perform your debugging tasks.
- Your database user is assigned the sap.hana.xs.debugger::Debugger role.
- You have enabled debugging in the SAP HANA studio. Note that to do the following, you require the sap.hana.xs.lm.roles::Administrator role:
- Switch to the Administration Console perspective.
- Double-click your system.
- Switch to the Configuration tab.
- Set the following parameter: xsengine.ini > debugger > enabled=true. If the debugger section is not already present, create it and add the parameter enabled. Assign the value
true
to the enabled parameter.
SAP Business Technology Platform, Neo environment will sunset on December 31, 2028, subject to terms of customer or partner contracts.
For more information, see SAP Note 3351844.
This documentation refers to SAP Business Technology Platform, Neo environment. If you are looking for documentation about other environments, see SAP Business Technology Platform
↗️ .
-
In the SAP BTP cockpit, navigate to a subaccount. For more information, see Navigate in the Cockpit
↗️ . -
Choose Applications > HANA XS Applications.
We recommend that you use the Google Chrome browser.
-
In the HANA XS Applications table, select the application to display its details.
-
In the Application Details section, click Open in Web-based Development Workbench. Note that the SAP HANA Web-based Development Workbench can also be opened directly at the following URL:
https://<database instance><subaccount>.<host>/sap/hana/xs/ide/
-
Depending on whether you want to debug a
.xsjs
file or a more complex scenario (set a breakpoint in a.xsjs
file and run another file), do the following:-
.xsjs
file:- Set the breakpoints and then choose the Run on server (F8) button.
-
Complex scenario:
- Set the breakpoint in the
.xsjs
file you want to debug. - Open a new tab in the browser and then open the other file on this tab by entering its URL (
https://<database instance><subaccount>.<host>/<package>/<file>
).
If you synchronously call the
.xsjs
file in which you have set a breakpoint and then open the other file in the SAP HANA Web-based Development Workbench and execute it by choosing the Run on server (F8) button, you will block your debugging session. You will then need to terminate the session by closing the SAP HANA Web-based Development Workbench tab. - Set the breakpoint in the
If you leave your debugging session idle for some time once you have started debugging, your session will time out. An error in the WebSocket connection to the backend will be reported and your WebSocket connection for debugging will be closed. If this occurs, reopen the SAP HANA Web-based Development Workbench and start another debugging session.
-