dappconnect-chat-sdk/.vscode/launch.json

103 lines
3.3 KiB
JSON

{
"version": "0.2.0",
// https://code.visualstudio.com/docs/nodejs/browser-debugging for browser debugging docs
// https://github.com/microsoft/vscode-js-debug/blob/d77a474700e16d647e8fe68c205ef867094fa092/OPTIONS.md for browser debugging options
// https://github.com/vitejs/vite/issues/10372#issuecomment-1321219125 for debugging deeply nested `node_modules` dependencies in Chrome DevTools
"configurations": [
{
"name": "Attach to Vite via Chrome",
"url": "http://localhost:5173",
"request": "launch",
"type": "chrome",
"smartStep": true,
"sourceMaps": true,
"runtimeArgs": ["--auto-open-devtools-for-tabs"]
},
{
"type": "node",
"request": "launch",
"name": "Launch via Vite Node",
"runtimeExecutable": "node",
"skipFiles": ["<node_internals>/**"],
// todo?: make relative to ${file}
"cwd": "${workspaceFolder}/packages/status-js",
"program": "${workspaceRoot}/node_modules/vite-node/dist/cli.mjs",
"args": ["--options.sourcemap=inline", "${file}"],
"smartStep": true,
"sourceMaps": true,
"env": {
"DEBUG": "*",
"DEBUG_HIDE_DATE": "0",
"DEBUG_COLORS": "1",
"VITE_NODE": "true"
},
"runtimeArgs": ["--preserve-symlinks"],
"outFiles": ["${workspaceFolder}/**/*.js"],
"resolveSourceMapLocations": ["**/*"]
},
{
"type": "node",
"request": "launch",
"name": "Debug Client",
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**"],
"cwd": "${workspaceFolder}/packages/status-js",
"program": "${workspaceRoot}/node_modules/vite-node/dist/cli.mjs",
"args": ["src/index.ts"],
"smartStep": true,
"console": "integratedTerminal",
"sourceMaps": true
},
{
"type": "node",
"request": "launch",
"name": "Debug Test File",
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
"args": ["run", "${relativeFile}"],
"smartStep": true,
"console": "integratedTerminal",
"sourceMaps": true
},
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "yarn dev"
},
{
"name": "Next.js: debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"skipFiles": [
".next/**",
"${workspaceFolder}/node_modules/**",
"<node_internals>/**",
"**/webpack-internal://**"
],
"runtimeArgs": ["--auto-open-devtools-for-tabs"]
},
// todo: consider https://code.visualstudio.com/docs/editor/debugging#_compound-launch-configurations instead
// todo: consider client+prelaunch as full stack
{
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "yarn dev -p 3000",
"serverReadyAction": {
"pattern": "started server on .+, url: (https?://.+)",
"action": "startDebugging",
"name": "Next.js: debug client-side",
"killOnServerStop": false
},
"skipFiles": [
".next/**",
"${workspaceFolder}/node_modules/**",
"<node_internals>/**"
]
}
]
}