diff --git a/.changeset/gold-horses-punch.md b/.changeset/gold-horses-punch.md new file mode 100644 index 0000000000..8cd38a22ed --- /dev/null +++ b/.changeset/gold-horses-punch.md @@ -0,0 +1,5 @@ +--- +"@blitzjs/generator": patch +--- + +Add vscode debugging configuration to new app templates diff --git a/.gitignore b/.gitignore index 12df5521cd..dae9a8ef8e 100644 --- a/.gitignore +++ b/.gitignore @@ -54,7 +54,6 @@ dist **/.envrc .blitz-* .blitz-cli-cache -.vscode .tsbuildinfo .nvmrc **/.test* diff --git a/apps/toolkit-app/.vscode/launch.json b/apps/toolkit-app/.vscode/launch.json new file mode 100644 index 0000000000..681a21e47a --- /dev/null +++ b/apps/toolkit-app/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Blitz: debug server-side", + "type": "node-terminal", + "request": "launch", + "command": "pnpm start:dev" + }, + { + "name": "Blitz: debug client-side", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000" + }, + { + "name": "Blitz: debug full stack", + "type": "node-terminal", + "request": "launch", + "command": "pnpm start:dev", + "serverReadyAction": { + "pattern": "started server on .+, url: (https?://.+)", + "uriFormat": "%s", + "action": "debugWithChrome" + } + } + ] +} diff --git a/packages/generator/templates/app/.vscode/launch.json b/packages/generator/templates/app/.vscode/launch.json new file mode 100644 index 0000000000..8d4c10351e --- /dev/null +++ b/packages/generator/templates/app/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Blitz: debug server-side", + "type": "node-terminal", + "request": "launch", + "command": "npm run dev" + }, + { + "name": "Blitz: debug client-side", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000" + }, + { + "name": "Blitz: debug full stack", + "type": "node-terminal", + "request": "launch", + "command": "npm run dev", + "serverReadyAction": { + "pattern": "started server on .+, url: (https?://.+)", + "uriFormat": "%s", + "action": "debugWithChrome" + } + } + ] +} diff --git a/packages/generator/templates/minimalapp/.vscode/launch.json b/packages/generator/templates/minimalapp/.vscode/launch.json new file mode 100644 index 0000000000..8d4c10351e --- /dev/null +++ b/packages/generator/templates/minimalapp/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Blitz: debug server-side", + "type": "node-terminal", + "request": "launch", + "command": "npm run dev" + }, + { + "name": "Blitz: debug client-side", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000" + }, + { + "name": "Blitz: debug full stack", + "type": "node-terminal", + "request": "launch", + "command": "npm run dev", + "serverReadyAction": { + "pattern": "started server on .+, url: (https?://.+)", + "uriFormat": "%s", + "action": "debugWithChrome" + } + } + ] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 23f7d178e6..d4a4c7356d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12070,7 +12070,7 @@ packages: pretty-format: 27.5.1 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.7.0_typescript@4.6.3 + ts-node: 10.7.0_fxg3r7oju3tntkxsvleuiot4fa transitivePeerDependencies: - bufferutil - canvas @@ -17344,7 +17344,6 @@ packages: typescript: 4.6.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - dev: false /ts-node/10.7.0_typescript@4.6.3: resolution: @@ -17377,6 +17376,7 @@ packages: typescript: 4.6.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + dev: false /tsconfig-paths/3.14.1: resolution: