diff --git a/docs/config/index.md b/docs/config/index.md index 0ee48e79a0e3e8..02a97194013fcf 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -121,3 +121,19 @@ export default defineConfig(({ mode }) => { } }) ``` + +## Debugging the Config File on VS Code + +With the default `--configLoader bundle` behavior, Vite writes the generated temporary configuration file to the `node_modules/.vite-temp` folder and a file not found error will occur when setting breakpoint debugging in the Vite config file. To fix the issue, add the following configuration to `.vscode/settings.json`: + +```json +{ + "debug.javascript.terminalOptions": { + "resolveSourceMapLocations": [ + "${workspaceFolder}/**", + "!**/node_modules/**", + "**/node_modules/.vite-temp/**" + ] + } +} +```