TL;DR: The VS Code debugger shows "Unbound breakpoint" error, but setting breakpoints in Chrome DevTools works. Chrome opens the respective file in VS Code automatically (after which the VS Code debugger for that file functions properly). Additionally, source files in Chrome have strange names like "HelloWorld.vue?4a7c."
I recently set up a new VueJS 3 project with Typescript using "vue create my_project". I chose Typescript, Babel, and Vue version 3 during setup.
I'm attempting to get the VS Code debugger running to debug my project similar to how I've done it with other projects, such as Java. I followed the best practices recommended by VS Code documentation. Unfortunately, since there isn't a specific debugging recipe for VueJS Typescript, I combined the VueJS and Typescript recipes and tried to adapt them for my needs.
The issue I'm facing is when I set a breakpoint in VS Code, it displays an "Unbound breakpoint" message. It seems that VS Code is struggling to map any of the source map files to my actual source files. This suggests that webpack may be causing issues with file naming or there could be an error in my file mapping configuration.
So far, I've managed to inspect the project using Chrome Developer Tools and set breakpoints in files like "main.ts," where the debugger works as expected once a breakpoint is hit. However, dealing with ".vue" files is more complex. In Chrome, these ".vue" files are obfuscated/compiled, but they show up as files named in a format like "[file-name].vue?[4-digit-hex-value]" (for example, "HelloWorld.vue?4a7c"). Setting breakpoints in these files works, and the corresponding file opens in VS Code automatically.
If anyone has a successful configuration setup that works in their environment, I would greatly appreciate some guidance.
Currently, I have the following configuration files:
launch.json