In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what are the three debugging methods provided by Vue". The explanation in the article is simple and clear and easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the three debugging methods provided by Vue?"
Configure debugging in VS Code
When building a project using Vue CLI 2:
Update the devtool property in config/index.js:
Devtool: 'source-map'
Click the Debugger icon in Activity Bar to come to the Debug view:
Select the Chrome/Firefox:Launch environment. Replace the contents of launch.json with:
{"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} / *"}, {"type": "firefox", "request": "launch", "name": "vuejs: firefox", "url": "http://localhost:8080"," webRoot ":" ${workspaceFolder} / src " "pathMappings": [{"url": "webpack:///src/", "path": "${webRoot} /"}]}
Start debugging:
Set the breakpoint:
# launch Project npm run dev
Select "vuejs:chrome" on the debug page:
II. Debugger statement
Recommend
Function potentiallyBuggyCode () {debugger / / do potentially buggy stuff to examine, step through, etc.}
Browser: F12 opens DevTools, and when running the program, it stops at the debbger statement:
Note: when the Eslint plug-in is installed, click Quick repair, Disable no-debugger for this line. Otherwise, the debugger statement is automatically cleared when it is saved.
III. Vue Devtools
Google browser plug-in.
Thank you for your reading, the above is the content of "what are the three debugging methods provided by Vue". After the study of this article, I believe you have a deeper understanding of what the three debugging methods provided by Vue are, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.