mirror of
https://github.com/bitwarden/clients.git
synced 2026-11-16 07:03:29 +00:00
* feat(browser): Add a Chrome debug launcher for the extension Loading the unpacked extension by hand into a personal Chrome profile mixes debug state into real browsing data, and the stable channel now refuses --load-extension outright. dev-chrome.mjs launches Chrome for Testing against an isolated profile under .debug/, reloading the extension as webpack rebuilds. puppeteer is deliberately not a dependency; the script fails with an install hint. * address feedback and add vscode launch config * clean up and remove watch mode * fix windows launch
111 lines
3.2 KiB
JSON
111 lines
3.2 KiB
JSON
{
|
|
"version": "0.2.0",
|
|
"configurations": [
|
|
{
|
|
"type": "node",
|
|
"request": "launch",
|
|
"name": "Jest All",
|
|
"program": "${workspaceFolder}/node_modules/.bin/jest",
|
|
"args": ["--runInBand"],
|
|
"console": "integratedTerminal",
|
|
"internalConsoleOptions": "neverOpen",
|
|
"disableOptimisticBPs": true,
|
|
"windows": {
|
|
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"request": "launch",
|
|
"name": "Jest Current File",
|
|
"program": "${workspaceFolder}/node_modules/.bin/jest",
|
|
"args": ["${fileBasenameNoExtension}", "--config", "jest.config.js"],
|
|
"console": "integratedTerminal",
|
|
"internalConsoleOptions": "neverOpen",
|
|
"disableOptimisticBPs": true,
|
|
"windows": {
|
|
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
|
|
}
|
|
},
|
|
{
|
|
"type": "lldb",
|
|
"request": "attach",
|
|
"program": "${workspaceFolder}/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron",
|
|
"name": "Desktop: Main desktop-native rust debugger (attach)"
|
|
},
|
|
{
|
|
"type": "node",
|
|
"request": "attach",
|
|
"name": "Desktop: Main (attach)",
|
|
"port": 5858,
|
|
"restart": false,
|
|
"continueOnAttach": true,
|
|
"sourceMaps": true,
|
|
"outFiles": ["${workspaceFolder}/apps/desktop/build/**/*.js"],
|
|
"skipFiles": ["<node_internals>/**"],
|
|
"presentation": { "hidden": true }
|
|
},
|
|
{
|
|
"type": "chrome",
|
|
"request": "attach",
|
|
"name": "Desktop: Renderer (attach)",
|
|
"port": 9222,
|
|
"webRoot": "${workspaceFolder}/apps/desktop",
|
|
"sourceMaps": true,
|
|
"timeout": 60000,
|
|
"presentation": { "hidden": true }
|
|
},
|
|
{
|
|
// Attaches to the Chrome instance launched by `npm run debug:browser`. The target tree
|
|
// covers every extension context: popup, tab pages, and the background service worker.
|
|
"type": "chrome",
|
|
"request": "attach",
|
|
"name": "Browser: Extension (attach)",
|
|
"port": 9200,
|
|
"webRoot": "${workspaceFolder}/apps/browser",
|
|
"sourceMaps": true,
|
|
"timeout": 60000,
|
|
"presentation": { "hidden": true }
|
|
},
|
|
{
|
|
"type": "chrome",
|
|
"request": "attach",
|
|
"name": "Web: Renderer (attach)",
|
|
"port": 9200,
|
|
"webRoot": "${workspaceFolder}/apps/web",
|
|
"sourceMaps": true,
|
|
"timeout": 60000
|
|
}
|
|
],
|
|
"compounds": [
|
|
{
|
|
"name": "Desktop: Attach Debugger (main + renderer)",
|
|
"configurations": [
|
|
"Desktop: Main (attach)",
|
|
"Desktop: Renderer (attach)",
|
|
"Desktop: Main desktop-native rust debugger (attach)"
|
|
]
|
|
},
|
|
{
|
|
"name": "Desktop: Start and debug",
|
|
"preLaunchTask": "desktop: debug start",
|
|
"configurations": [
|
|
"Desktop: Main (attach)",
|
|
"Desktop: Renderer (attach)",
|
|
"Desktop: Main desktop-native rust debugger (attach)"
|
|
],
|
|
"stopAll": true
|
|
},
|
|
{
|
|
"name": "Browser: Attach Debugger (extension)",
|
|
"configurations": ["Browser: Extension (attach)"]
|
|
},
|
|
{
|
|
"name": "Browser: Start and debug",
|
|
"preLaunchTask": "browser: debug start",
|
|
"configurations": ["Browser: Extension (attach)"],
|
|
"stopAll": true
|
|
}
|
|
]
|
|
}
|