Breakpoints not working properly with devtool strategy in the Quasar document on fresh new project #10910
Replies: 15 comments 5 replies
-
I have managed to fix this by changing
I have not thoroughly tested it yet but it seems to be working. Reference: https://stackoverflow.com/questions/52648552/debugger-settings-for-chrome-in-vs-code-with-vue-js I am not closing this issue since I believe the Quasar document should be changed to reflect receent changes in VS Code or Webpack (not sure when and where this breaking change was introduced). |
Beta Was this translation helpful? Give feedback.
-
Having the same issue: Can't set breakpoints in Vue files in VSCode on Win10.
Finally got it to work using:
Where junk2 is the project root directory Beat. Further update...
|
Beta Was this translation helpful? Give feedback.
-
For the life of me, I swear I have tried every combination of 'sourceMapPathOverrides' people have suggested and I just cant get it to hit my breakpoints. |
Beta Was this translation helpful? Give feedback.
-
@jaybo Thanks. I ended up with this.
The first line gets most of the project source files. |
Beta Was this translation helpful? Give feedback.
-
This is crazy... Thanks @jaybo & @exemplari your config helps me a bit, but I still got really weird issues... Step 1/ Create new quasar project Step 2/ Update launch.json config with this one: {
"type": "chrome",
"request": "launch",
"name": "Quasar App: chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"breakOnLoad": true,
"sourceMapPathOverrides": {
"webpack://${workspaceFolderBasename}/./src/*": "${webRoot}/*"
}
} => Now breakpoint does work on this new project BUT Step 3/ If I copy this project into a new folder, What is going on with VSCode here ? oO |
Beta Was this translation helpful? Give feedback.
-
@xavier-rodet and anyone lost in debug strangeness. Using VS-Code nightly debugger (ms-vscode.js-debug-nightly) and the webpack 5 style sourceMap is the solution. However, windows 10 is the underlying problem. There is an issue with Windows 10 / WSL2 and reserved ports , since around version 2004 . I haven't seen any real explanation of this but here is an example microsoft/WSL#5306 For me this results in trying to launch the debugger and it sometimes working, sometimes not, depending on the randomly assigned ports used for connecting vscode to the browser. Testing this on windows 8 machine and the debugger never miss. |
Beta Was this translation helpful? Give feedback.
-
Same issue bothers me a lot, is there any solution update? |
Beta Was this translation helpful? Give feedback.
-
I found that debugger works on .js files, but not on .vue. I use pug for templates. If I use standard html then breakpoints works ok. What it can be? My configuration:
build section from quasar.conf.js
|
Beta Was this translation helpful? Give feedback.
-
I am moving this to Discussions as this is not a Quasar issue. |
Beta Was this translation helpful? Give feedback.
-
I'm work with:
|
Beta Was this translation helpful? Give feedback.
-
The following worked for me. quasar.conf.js
launch.json
|
Beta Was this translation helpful? Give feedback.
-
@robMolloy @ljubadr I'm having the same issue. I just converted a reasonably large Quasar JavaScript project to TypeScript, and everything is working fine EXCEPT I can't set breakpoints in .vue files. I think I've tried all permutations of possible project file and launch settings, along with different versions of the relevant libraries. Since @hawkeye64 indicates this isn't a Quasar issue, I'm at a loss how to fix it.
|
Beta Was this translation helpful? Give feedback.
-
Can't get it to work with Webstorm either. Breakpoints are not hit, frustrating. |
Beta Was this translation helpful? Give feedback.
-
Still no way to make it work |
Beta Was this translation helpful? Give feedback.
-
Seems to be related to this https://ckhconsulting.com/vue-typescript-debuggers/ I also tried Vite + VsCode and debugging is working properly everywhere (Vue, script setup TS, etc.). |
Beta Was this translation helpful? Give feedback.
-
Probably related issue: #8235 . This is not a duplicate. It may or may not be a document issue. I am unable to determine the reason.
In the quasar document https://quasar.dev/start/vs-code-configuration the devtool strategy
devtool: 'source-map'
prevents breakpoints to work properly in VS Code with Chrome. I've successfully reproduced this bug in a fresh new quasar project.By simply removing this line I am able to properly debug in Chrome, and it pauses properly at the breakpoint.
To reproduce
quasar create
, enter anythingdevtool: 'source-map'
to thebuild
sectionquasar dev
launch.json
according to the document at https://quasar.dev/start/vs-code-configurationExpected behavior
The breakpoint should work for VS Code with Chrome. And it should only break when it runs the given line.
Index.vue
Just some copy-and-paste from QButton document.
quasar.conf not working properly (all lines are auto generated except the devtool config)
Versions
OS: Windows
Node: 14
Browser: Chrome 91.0.4472.77
Pkg quasar: v1.15.20
Pkg @quasar/app: v2.2.9
Dev mode: spa
VS Code: 1.56.2
VS Code Extension:
Debugger for Chrome
: v4.12.12package.json auto generated by quasar cli
Beta Was this translation helpful? Give feedback.
All reactions