Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of debugging Vue Code in VSCode

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the method of debugging Vue code in VSCode, which is very detailed and has certain reference value. Friends who are interested must finish it!

Step to open vscode Install Debugger for Chrome use vue cli3 to create vue application project root path add "vue.config.js" file module.exports = {configureWebpack: {devtool: 'source-map'}} .vscode file launch.json add: "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} / *"}]} set a breakpoint to open your favorite terminal in the root directory and use Vue CLI to open the application:

Npm run serve goes to the Debug view, selects the "vuejs:chrome/firefox" configuration, and then press F5 or click the green play button.

With a new browser instance opening http://localhost:8080, your breakpoint should now be hit. This is all of the article "how to debug Vue code in VSCode". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report