Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable breakpoints for .vue #116

Closed
chrmarti opened this issue Apr 7, 2017 · 8 comments
Closed

Enable breakpoints for .vue #116

chrmarti opened this issue Apr 7, 2017 · 8 comments
Labels

Comments

@chrmarti
Copy link

chrmarti commented Apr 7, 2017

vetur 0.5.6

The package.json would need to contribute "breakpoints": [ { "language": "vue" } ].

(microsoft/vscode#23385)

@octref
Copy link
Member

octref commented Apr 10, 2017

There is no debugging functionalities built-in yet. So even if I enable breakpoints they wouldn't work.

They are the last thing on my roadmap, because AFAIK people in Vue community use https://github.com/vuejs/vue-devtools for debugging and it has been OK for most scenarios.

I'll try to find what VSCode's debugging functionality can provide in complement to vue-devtools.
But that's for later. Current focus is to make IntelliSense and formatter better.

@octref octref closed this as completed Apr 10, 2017
@chrmarti
Copy link
Author

@octref You can already debug JavaScript code in .vue files when source maps are set up correctly.

@octref
Copy link
Member

octref commented Apr 10, 2017

@chrmarti Interesting. I never tried that before.
I'll give it a try this weekend and include some usage doc if it works well.

@octref
Copy link
Member

octref commented May 13, 2017

@chrmarti I've enabled it but never got it working with chrome debugger yet.
Do you have a repo where you were able to successfully debug vue app with VSCode?

@chrmarti
Copy link
Author

@octref It is likely an issue with the source maps. We used a starter kit (https://github.com/cheft/vue-starter-kit) and got it running with this launch config:

        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "http://localhost:8080",
            "webRoot": "${workspaceRoot}",
            "sourceMapPathOverrides": {
                "webpack:///*": "${workspaceRoot}/src/components/*"
            }
        },

Could you check in Chrome's dev tools where the transpiled files and where the original sources are? /cc @roblourens

@octref
Copy link
Member

octref commented May 13, 2017

@chrmarti Yea I opened an issue https://github.com/Microsoft/vscode-chrome-debug/issues/430#issuecomment-301272109. I'm looking towards to get some official examples, such as https://github.com/vuejs-templates/webpack or https://github.com/vuejs/vue-hackernews-2.0 working with sourcemap debugging.

@packetstracer
Copy link

have a look at this forum thread, no IDE breakpoints but debugger statements working (with sourcemaps) on .js and .vue files.

https://forum.vuejs.org/t/debugging-vue-files-with-visual-studio-code/8022

octref added a commit that referenced this issue Nov 22, 2017
@thoni56
Copy link

thoni56 commented Mar 3, 2019

I suppose the actual link should go to https://forum.vuejs.org/t/debugging-vue-files-with-visual-studio-code/8022? Now it goes back to github...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants