Skip to content

Commit

Permalink
Fix vscode launch configs to allow setting breakpoints in the IDE
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable committed Apr 20, 2024
1 parent 47fe8e8 commit ea37c04
Showing 1 changed file with 66 additions and 17 deletions.
83 changes: 66 additions & 17 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,79 @@
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["debug", "dev", "test/e2e/app-dir/app"],
"runtimeExecutable": "node",
"runtimeArgs": [
"packages/next/dist/bin/next",
"dev",
"test/e2e/app-dir/app"
],
"skipFiles": ["<node_internals>/**"],
"sourceMapPathOverrides": {
"webpack://_N_E/../../../*": "${workspaceFolder}/packages/next/*",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*"
},
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1"
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
"NEXT_TELEMETRY_DISABLED": "1"
}
},
{
"name": "Launch test/e2e/app-dir/app build",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["debug", "build", "test/e2e/app-dir/app"],
"runtimeExecutable": "node",
"runtimeArgs": [
"packages/next/dist/bin/next",
"build",
"test/e2e/app-dir/app"
],
"skipFiles": ["<node_internals>/**"],
"sourceMapPathOverrides": {
"webpack://_N_E/../../../*": "${workspaceFolder}/packages/next/*",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*"
},
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1"
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
"NEXT_TELEMETRY_DISABLED": "1"
}
},
{
"name": "Launch examples/hello-world development",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["debug", "dev", "examples/hello-world"],
"runtimeExecutable": "node",
"runtimeArgs": [
"packages/next/dist/bin/next",
"dev",
"examples/hello-world"
],
"skipFiles": ["<node_internals>/**"],
"sourceMapPathOverrides": {
"webpack://_N_E/../../../*": "${workspaceFolder}/packages/next/*",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*"
},
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1"
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
"NEXT_TELEMETRY_DISABLED": "1"
}
},
{
"name": "Launch examples/hello-world build",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["debug", "build", "examples/hello-world"],
"runtimeExecutable": "node",
"runtimeArgs": [
"packages/next/dist/bin/next",
"build",
"examples/hello-world"
],
"sourceMapPathOverrides": {
"webpack://_N_E/../../../*": "${workspaceFolder}/packages/next/*",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*"
},
"skipFiles": ["<node_internals>/**"],
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1"
Expand All @@ -57,23 +92,37 @@
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["debug", "start", "examples/hello-world"],
"runtimeExecutable": "node",
"runtimeArgs": [
"packages/next/dist/bin/next",
"start",
"examples/hello-world"
],
"skipFiles": ["<node_internals>/**"],
"sourceMapPathOverrides": {
"webpack://_N_E/../../../*": "${workspaceFolder}/packages/next/*",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*"
},
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1"
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
"NEXT_TELEMETRY_DISABLED": "1"
}
},
{
"name": "Launch current directory in development",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["debug", "dev", "${fileDirname}"],
"runtimeExecutable": "node",
"runtimeArgs": ["packages/next/dist/bin/next", "dev", "${fileDirname}"],
"skipFiles": ["<node_internals>/**"],
"sourceMapPathOverrides": {
"webpack://_N_E/../../../*": "${workspaceFolder}/packages/next/*",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*"
},
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1"
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
"NEXT_TELEMETRY_DISABLED": "1"
}
},
{
Expand Down

0 comments on commit ea37c04

Please sign in to comment.