Debug multiple SAP CAP services simultaneously β directly from VS Code.
VS Code Marketplace License VS Code
Working with SAP CAP on Cloud Foundry means juggling multiple services at once:
- Opening terminals one by one, remembering ports each time
- Editing
launch.jsonby hand every session - No way to see which CF apps are actually running at a glance
CDS Debug removes all of that friction.
A sidebar panel connects to your Cloud Foundry environment, shows your running apps, and with one click:
- Starts each selected service with
cds debugin the background - Writes attach configs into
.vscode/launch.jsonautomatically - Attaches the VS Code debugger β no manual setup required
- πΊοΈ Region Picker β choose from the cf-sync SAP CF region catalog or enter a custom endpoint
- π Zero-input Auth β reads
SAP_EMAIL/SAP_PASSWORDfrom your shell environment automatically - π Live App List β started apps on top, stopped dimmed below, with instant search
- βοΈ Multi-select Debug β tick any started apps and launch all sessions at once
- π’ Session Status Panel β watch each app go from Connecting β Debugger Attached in real time
- π§ Auto
launch.jsonβ configs are merged in, not overwritten; your manual entries stay safe - π¦ Package Browser β browse loaded npm package sources from attached sessions without requiring a local
node_modulesinstall - π§© Shared CAP Config β define one global fallback in VS Code user settings instead of copying
cap-debug-config.jsoninto every workspace - πΎ Persistent Mapping β org β folder mapping is saved, no re-setup on restart
- β‘ Background Cache β app list pre-fetched in the background so loading feels instant, with automatic retry for canceled or failed sync attempts
- π‘οΈ App Watchdog β every app you start debugging is pinged on its mapped route for 8 hours; if it stops responding (e.g. a leftover breakpoint froze the remote process), a status bar warning points at it and opens a detail page. Apps you are actively debugging are skipped while their session is alive
- βοΈ Settings Panel β control cache sync interval, watchdog ping interval, trigger a manual sync, or log out
- Node.js β₯ 20
- CF CLI installed and on
$PATH - Environment variables set in your shell:
SAP_EMAIL=your@email.com SAP_PASSWORD=yourpassword
If you open VS Code from the Dock or Spotlight (not a terminal), the extension automatically reads these from your shell dotfiles β no extra steps needed.
Search CDS Debug in the VS Code Extensions panel, or install directly from the Marketplace:
ext install dongtran.cds-debug
Click the β‘ CDS Debug icon in the Activity Bar.
Select your region from the grid (or enter a custom endpoint), then click Login to Cloud Foundry. CDS Debug refreshes that region's org list through cf-sync before showing the org step, without loading spaces or apps. Credentials are read from your environment β nothing to type.
Select the org you want to work with, then click Browse... to choose its local folder on your machine. This is saved automatically β you only do it once.
Search or scroll the app list, tick the services you want to debug, and hit βΆ Start Debug Sessions.
The extension opens a background process per service, updates launch.json, and attaches the debugger automatically.
If you reuse the same CAP debug settings across many workspaces, add this to your VS Code user settings.json:
{
"cdsDebug.sharedCapDebugConfig": {
"remoteRoot": "/home/vcap/app",
"orgBranchMap": {
"sample-org": "sample-branch"
}
}
}remoteRoot can also be resolved per app when services are deployed under different folders. Use an explicit regex with regex:<pattern> or /pattern/flags; CDS Debug runs a safe cf ssh lookup, checks remote package.json folder candidates locally against the regex, and writes the concrete matching folder to launch.json.
{
"cdsDebug.sharedCapDebugConfig": {
"remoteRoot": "regex:^/(usr/)?sample-service-[a-z]+$"
}
}Precedence is:
- per-service
cap-debug-config.json - user
cdsDebug.sharedCapDebugConfig - workspace
.vscode/cap-debug-config.json
When you start debugging, CDS Debug matches each CF app to a local source folder under your mapped org folder by name, automatically trying the exact app name and a -β_ variant. If a CF app's name differs too much from its local folder, that app would otherwise fall back to console-only debugging with no source maps. Add explicit mappings to your VS Code user settings.json:
{
"cdsDebug.appFolderMappings": [
{ "appName": "sample-service-billing", "folderName": "billing-internal" }
]
}folderName is a folder basename β CDS Debug searches your mapped org folder recursively (depth β€ 6) for a folder with that name containing a package.json. An explicit mapping has the highest matching priority, ahead of the exact and underscore-normalized name. If the named folder cannot be found (or has no package.json), resolution falls back to the automatic name matching, exactly as before. App names are matched exactly and case-sensitively; on duplicate appName entries the first wins.
The Packages screen has a Package Regex Filter field that narrows which packages are shown. You can set a default value in VS Code settings so it is pre-populated every time:
// .vscode/settings.json (workspace scope) { "cdsDebug.packageRegexFilter": "^@my-org/" }
Or in your user settings.json to apply it across all workspaces.
Sync behaviour:
- On first load, if
cdsDebug.packageRegexFilteris set at workspace or user scope, the extension picks it up automatically. - When you edit the filter in the Packages UI, the extension saves it back to the VS Code setting at the same scope where it was originally set (workspace or user), keeping settings and UI in sync.
- If you later change the VS Code setting directly (e.g. via
settings.json), the extension detects the change and updates the UI immediately.
| Command | Description |
|---|---|
CDS Debug: Reset Configuration |
Clears saved org mappings and login config |
CDS Debug: Show App Watchdog |
Opens the watchdog page listing watched apps and any that stopped responding |
pnpm install pnpm build # compile with esbuild pnpm test # run unit tests (Vitest) pnpm test:coverage # coverage report pnpm lint # ESLint pnpm typecheck # tsc --noEmit pnpm package # build β cds-debug-x.x.x.vsix