Code mapping in VS-Code and Vue


Open launch.js and insert following

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome against localhost",
      "url": "http://localhost:8080",
      "webRoot": "${workspaceFolder}/code/src",
      "sourceMapPathOverrides": {
        "webpack:///src/*": "${webRoot}/*",
        "webpack:///./src/*":   "${webRoot}/*", 
      }
    }
  ]
}
If you see an error saying “Chrome not found”, it might be unable to find chrome in your system because it is looking for “google-chrome” and you have probably “chromium” in your /usr/bin. To fix this error, create a link to chromium
sudo ln -s /usr/bin/chromium /usr/bin/google-chrome


You can see the paths here

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s