From 069c75e52249b3ba2ae1fb871f83a6e449ad6f18 Mon Sep 17 00:00:00 2001 From: qwabra Date: Mon, 23 Dec 2019 01:59:32 +0300 Subject: [PATCH] move `--inspect` flag to env ## first `$ ./node_modules/.bin/next dev --inspect` > Error: Use env variable NODE_OPTIONS instead: NODE_OPTIONS="--inspect" next dev ## second `"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/next",` - path to "nextjs" in dependencies (locally for project) `"runtimeExecutable": "next",` - if nextjs is installed globally --- Next-js/README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Next-js/README.md b/Next-js/README.md index bee94cc..2d2e5e1 100644 --- a/Next-js/README.md +++ b/Next-js/README.md @@ -51,10 +51,10 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome* "type": "node", "request": "launch", "name": "Next: Node", - "runtimeExecutable": "next", - "runtimeArgs": [ - "--inspect" - ], + "env": { + "NODE_OPTIONS": "--inspect" + }, + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/next", "port": 9229, "console": "integratedTerminal" } @@ -66,7 +66,10 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome* } ] } - ``` +``` + +`"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/next",` - path to "nextjs" in dependencies (locally for project) +`"runtimeExecutable": "next",` - if nextjs is installed globally ## Debugging of the Node process