Files
angular__angular/.vscode/launch.json
T
Alan Agius 66999dd65b build: enable breakpoints in source files (#64220)
This commit revamps the debugging setup and enabling developers to set breakpoints directly in the source TypeScript files.

Key changes include:
- Updated `launch.json` with source map path overrides to correctly map compiled output back to the original source code.
- Switched from `external` to `linked` sourcemaps in the Bazel build configuration for better debugging support.
- Consolidated the recommended VSCode settings into the main `launch.json` and `tasks.json`, removing the separate `recommended-*.json` files.
- Updated the debugging documentation to reflect the new, simplified workflow.

These changes significantly improve the developer experience for contributors working on the language service, making it much easier to debug and troubleshoot issues.

This applies to both the framework packages and vscode-ng-langugage-service.

PR Close #64220
2025-10-07 20:38:36 -04:00

85 lines
2.5 KiB
JSON

// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "VSCE: Launch Dev Client",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/vscode-ng-language-service"
],
"preLaunchTask": "VSCE: watch bundles"
},
{
"type": "extensionHost",
"request": "launch",
"name": "VSCE: Launch Prod Client",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/dist/bin/vscode-ng-language-service/npm/vscode-ng-language-service/vsix_sandbox"
],
"preLaunchTask": "VSCE: package"
},
{
"name": "VSCE: Attach to Server",
"type": "node",
"request": "attach",
"port": 6009,
"restart": true,
"sourceMaps": true,
"skipFiles": ["<node_internals>/**"],
"sourceMapPathOverrides": {
"?:*/bin/*": "${workspaceFolder}/*"
},
"resolveSourceMapLocations": ["!**/node_modules/**"]
},
{
"name": "DEBUG: Attach to bazel test",
"type": "node",
"request": "attach",
"port": 9229,
"restart": true,
"timeout": 600000,
"sourceMaps": true,
"skipFiles": ["<node_internals>/**"],
"sourceMapPathOverrides": {
"?:*/bin/*": "${workspaceFolder}/*"
},
"resolveSourceMapLocations": ["!**/node_modules/**"]
},
{
"name": "DEBUG: Run bazel test (Custom Target)",
"type": "node",
"request": "launch",
"restart": true,
"timeout": 600000,
"runtimeExecutable": "pnpm",
"runtimeArgs": ["bazel", "test", "${input:bazelTarget}", "--config=debug"],
"console": "integratedTerminal",
"cwd": "${workspaceFolder}"
}
],
"compounds": [
{
"name": "VSCE: Dev Client + Attach to Server",
"configurations": ["VSCE: Launch Dev Client", "VSCE: Attach to Server"]
},
{
"name": "DEBUG: Run bazel test (Custom Target) + Attach",
"configurations": ["DEBUG: Attach to bazel test", "DEBUG: Run bazel test (Custom Target)"]
}
],
"inputs": [
{
"id": "bazelTarget",
"type": "promptString",
"description": "Enter the Bazel test target (e.g., //path/to/my:unit_test)",
"default": "//packages/..."
}
]
}