Skip to content

07. Test Debug

Vitaly Kozyura edited this page Jul 7, 2025 · 11 revisions

Test and Debug Extensions

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.

Running the Extension Project in Debug Mode

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.

Clone this wiki locally