Skip to content

Commit

Permalink
add debug configs
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-burel committed Nov 27, 2020
1 parent d3b21bf commit 2c127bc
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"version": "0.2.0",
"nodeVersionHint": 10,
"configurations": [
// work ok, expect server to run already
{
"type": "chrome",
"request": "launch",
"name": "Next: Chrome (frontend)",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
"env": {
"NODE_OPTIONS": "--inspect"
},
"skipFiles": [
"${workspaceFolder}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
},
{
// Expect server to run with "yarn run debug"
"type": "node",
"request": "attach",
"name": "Next: Node (backend)",
"skipFiles": ["<node_internals>/**"],
"port": 9229
},
{
"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"
}
}
]
/*
"compounds": [
{
"name": "Next: Full",
"configurations": ["Next: Node", "Next: Chrome"]
}
]*/
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"scripts": {
"dev": "next",
"debug": "NODE_OPTIONS='--inspect' next",
"build": "next build",
"start": "next start",
"test": "npm run test:unit && npm run test:e2e",
Expand Down

0 comments on commit 2c127bc

Please sign in to comment.