forked from SAP-archive/teched2022-AD264
-
Notifications
You must be signed in to change notification settings - Fork 1
07. Test Debug
Vitaly Kozyura edited this page Jul 7, 2025
·
11 revisions
In this section, we will debug extension handlers running locally.
To do this, we'll run the extension project in the same Node.js environment, instead of executing it within the Oyster Framework.
Modify the runtime parameter in the extension's package.json
file from "oyster"
to "debug"
:
"cds": {
"requires": {
"code-extensibility": {
"runtime": "debug",
"maxTime": 1000,
"maxMemory": 4
}
}
}
Start the extension project using cds watch
with a debugger attached.
For example, you can use the JavaScript Debug Terminal in Visual Studio Code.
Set a breakpoint, for instance, at line 3 in the on-promoteCustomer.js file.
In the Incidents preview, select an incident and click the promote Customer
button.
Execution should stop at the breakpoint.