Last active
September 30, 2022 10:25
-
-
Save jojijacobk/65111bd3080755aad1a6d291bcb6f769 to your computer and use it in GitHub Desktop.
How to debug Next.js in VSCode? How to prevent weird cache issue in VSCode which will retain older source code files even after we modify them in the editor. Use the following configuration to achieve this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Next.js: debug server-side", | |
"type": "node-terminal", | |
"request": "launch", | |
"command": "npm run dev", | |
"preLaunchTask": "clear-editor-history" | |
}, | |
{ | |
"name": "Next.js: debug client-side", | |
"type": "chrome", | |
"request": "launch", | |
"url": "http://localhost:3000", | |
"preLaunchTask": "clear-editor-history" | |
}, | |
{ | |
"name": "Next.js: debug full stack", | |
"type": "node-terminal", | |
"request": "launch", | |
"command": "npm run dev", | |
"console": "integratedTerminal", | |
"serverReadyAction": { | |
"pattern": "started server on .+, url: (https?://.+)", | |
"uriFormat": "%s", | |
"action": "debugWithChrome" | |
}, | |
"preLaunchTask": "clear-editor-history" | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "clear-editor-history", | |
"command": "${command:workbench.action.clearEditorHistory}" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment