How do I debug vue js application in VS Code?
So after some stumbling around, I figured that starting point for debug has to start the server, hence program
is set to /build/dev-server.js
, in launch.json
:
{ "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Launch Program", "program": "${workspaceRoot}/build/dev-server.js", "cwd": "${workspaceRoot}" }, { "type": "node", "request": "attach", "name": "Attach to Process", "port": 5858 } ]}
Now you can debug vue.js application, either by pressing F5 or by going to Debug sidebar (Ctrl-Shift-D
) then selecting "Launch Program" and clicking on green start button. You can toggle debug console window with Ctrl-Shift-Y
.
For posterity, launch.json
is created first time you try to debug in .vscode
folder of your application.