From 224c34a3e5902d0945288aae4bc4d963bbf0d098 Mon Sep 17 00:00:00 2001 From: Calvin Wong Date: Fri, 12 Oct 2018 23:42:00 -0700 Subject: [PATCH] Clarify launch.json step & add Nuxt.js debug link * Add a link to help Nuxt.js users debug with VSCode * Rephrase step 2 of the "Configure launch.json File" section for clarity in case the user already has existing configurations that they want to keep alongside the tutorial's * Use `js` formatting over `json` for extra readability (the `js` formatting supports JSON objects and has additional color-coding) --- vuejs-cli/README.md | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/vuejs-cli/README.md b/vuejs-cli/README.md index dd19ad5..1cc83cf 100644 --- a/vuejs-cli/README.md +++ b/vuejs-cli/README.md @@ -6,6 +6,7 @@ This recipe shows how to use the [Debugger for Chrome](https://github.com/Micros **Notice**: Please be aware that we have found issues with the sourcemaps generated by vue-cli, which are causing problems for the debugging experience in VS Code. See https://github.com/vuejs/vue-loader/issues/1163 +If you're using Vue.js through the Nuxt.js framework, see https://codeburst.io/debugging-nuxt-js-with-visual-studio-code-724920140b8f ## Getting Started @@ -65,24 +66,24 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome* ![config_add](config_add.png) -2. Replace content of the generated launch.json with the following two configurations: +2. Update the generated `launch.json`'s `configurations` to include the "vuejs: chrome" configuration as seen below: -```json - { - "version": "0.2.0", - "configurations": [ - { - "type": "chrome", - "request": "launch", - "name": "vuejs: chrome", - "url": "http://localhost:8080", - "webRoot": "${workspaceFolder}/src", - "breakOnLoad": true, - "sourceMapPathOverrides": { - "webpack:///src/*": "${webRoot}/*" - } - } - ] +```js +{ + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "vuejs: chrome", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}/src", + "breakOnLoad": true, + "sourceMapPathOverrides": { + "webpack:///src/*": "${webRoot}/*" + } + } + ] } ```