From c481043e5bebb02d09d9c919adde924365e200e4 Mon Sep 17 00:00:00 2001 From: Hendrik Liebau Date: Wed, 17 Apr 2024 21:59:01 +0200 Subject: [PATCH] Fix vscode launch configs to allow setting breakpoints in the IDE --- .vscode/launch.json | 83 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 66 insertions(+), 17 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 8a3d1eab5bf1fa..7e1bfa1c538081 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,11 +9,20 @@ "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": ["/**"], + "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" } }, { @@ -21,11 +30,20 @@ "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": ["/**"], + "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" } }, { @@ -33,11 +51,20 @@ "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": ["/**"], + "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" } }, { @@ -45,8 +72,16 @@ "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": ["/**"], "env": { "NEXT_PRIVATE_LOCAL_WEBPACK": "1" @@ -57,11 +92,20 @@ "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": ["/**"], + "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" } }, { @@ -69,11 +113,16 @@ "type": "node", "request": "launch", "cwd": "${workspaceFolder}", - "runtimeExecutable": "pnpm", - "runtimeArgs": ["debug", "dev", "${fileDirname}"], + "runtimeExecutable": "node", + "runtimeArgs": ["packages/next/dist/bin/next", "dev", "${fileDirname}"], "skipFiles": ["/**"], + "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" } }, {