Created
April 18, 2020 21:47
-
-
Save wes-goulet/ca95cedef1aa6458cf0623828028b4cf to your computer and use it in GitHub Desktop.
Example VSCode Debug Config for debugging rollup and jest tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Debug Rollup", | |
"program": "${workspaceFolder}/node_modules/.bin/rollup", | |
"args": ["-c"], | |
"internalConsoleOptions": "openOnSessionStart" | |
}, | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Debug Jest", | |
"program": "${workspaceFolder}/node_modules/.bin/jest", | |
"args": ["-i", "--config=${workspaceFolder}/jest.config.js"], | |
"internalConsoleOptions": "openOnSessionStart" | |
}, | |
{ | |
"type": "node", | |
"request": "attach", | |
"name": "Attach", | |
"port": 9229, | |
"skipFiles": ["<node_internals>/**"] | |
} | |
] | |
} |
Thanks for this!
I had to update the path to rollup to "${workspaceFolder}/node_modules/rollup/dist/bin/rollup"
:
{
"type": "pwa-node",
"request": "launch",
"name": "dev (rollup/svelte)",
"program": "${workspaceFolder}/node_modules/rollup/dist/bin/rollup",
"args": [
"-c",
"--watch"
],
"internalConsoleOptions": "openOnSessionStart"
},
Why: for my version at least, node_modules/.bin/rollup
is actually a shell script wrapper
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Place under
<repo-root>/.vscode/launch.json