How to debug vue.js with vscode



How to debug vue.js with vscode

How to debug vue.js with vscode

In this video I have explained how you can debug vue.js application with Visual Studio Code.

You can download Visual Studio Code from following.
https://code.visualstudio.com/

Extension needed for this is Debugger for chrome. You can download that from the following link.

https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome

Then you need to create a vue.config.js file in root of your src folder and put following code.

module.exports = {
configureWebpack: {
devtool: ‘source-map’
}
}

Then in launch.json. You need to put the following.

{
“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}/*”
}
}
]
}

Make sure that you have same port as your cli or application in launch.json.

Here are other videos for debugging with vscode.

How to debug react with vscode – https://www.youtube.com/watch?v=pslWodrak38

How to debug angular with vscode- https://www.youtube.com/watch?v=jSVeO7gCmxA&t=53s

My YouTube channel:
===========================
Please do subscribe to my YouTube channel – http://bit.ly/codewithjv

Follow me on:
==================================
Instagram: https://www.instagram.com/jalpesh.vadgama
Twitter: https://twitter.com/jalpesh
Github: https://github.com/jalpeshvadgama

Comments are closed.