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

Vue component unverified breakpoints #267

Open
Metal-spoon opened this issue Oct 20, 2021 · 8 comments
Open

Vue component unverified breakpoints #267

Metal-spoon opened this issue Oct 20, 2021 · 8 comments

Comments

@Metal-spoon
Copy link

Metal-spoon commented Oct 20, 2021

Breakpoints in my vue component are all unverified
launch.json is as follows:

"version": "0.2.0",
"configurations": [
    {
        "type": "firefox",
        "request": "launch",
        "name": "vuejs: firefox",
        "url": "http://localhost:8080",
        "webRoot": "${workspaceFolder}",
        "log": {
            "fileName": "${workspaceFolder}/log.txt",
            "fileLevel": {
                "default": "Debug"
            }
        },
        "pathMappings": [
            {
              "url": "webpack:///src",
              "path": "${webRoot}"
            }
          ],
          "skipFiles": [ // optional
            "${workspaceFolder}/node_modules/**"
          ]
    }
]

Tried numerous pathmapping configs but none seem to work with any component.
Using the loaded scripts tab and checking the logs it seems everything is being mapped correctly, even without pathMappings being set.

Oddly enough if i set a breakpoint in app.vue in the src folder it does actually work but no breakpoints in any file in the components folder work.
Log attached for your pleasure.

log.txt

Other relevant info:

  • using vue 3, whole app is typescript
  • firefox 93.0
  • extension version 2.9.4
  • npm version 8.1.0
  • everything on pop!_os 21.04 (basically ubuntu 21.04)

edit:
forgot to mention, vue.config.js is set correctly to:
module.exports = { configureWebpack: { devtool: 'source-map' } }

@JSteitz
Copy link

JSteitz commented Mar 12, 2022

I have a similar issue. They are all unverified, but partially work.

In my tests, I noticed that all the breakpoints that are meant for a page load do not work. All the others work, although they are unverified.

Further I noticed that the breakpoint is removed on page load and later set again. The way I see it, however, they are set too late. In the logs you can see that.

Steps to reproduce:

  1. set a breakpoint in any line
  2. then add debugger; in a line after the breakpoint
  3. reload/open page
  4. breakpoint is skipped, but not debugger.

With this scenario, you can see in the logs that the breakpoint is not set again until after the pause event.

Line 79: breakpoint removal request
Line 104: pause event received (for debugger)
Line 133: setting breakpoint request

Log file: log.txt

@karelkral
Copy link

The same with React and Firefix greater then 93. Breakpoints do not work.

@TriMoon
Copy link

TriMoon commented Apr 1, 2022

Are you guys using sourcemaps?
See: Debugging in VS Code

@plastic-fork i just noticed your edit at end...
Which bundler are you using?

  • (rollup fe. needs different stuff)
    export default {
    	....
    	,output: [{
    		....
    		,sourcemap: true
    	}
    	,{
    		....
    		,sourcemap: true
    	}]
    }

@karelkral
Copy link

I am using WebPack 5.65.0 and devtool: "inline-source-map".

The debugger is broken in Firefox 98. It was working fine with older versions, I am stuck at Firefox 93. Not sure the exact version of Firefox when the debugger is broken.

@JSteitz
Copy link

JSteitz commented Apr 1, 2022

@karelkral The debugger works. Please check that you use version 2.9.6
I had the same issue, because only 2.9.4 was downloaded for me. The tags are also missing in github.

@karelkral
Copy link

@JSteitz Yes, I have 2.9.6 version.
Are you working with Webpack and Firefox 98 and debugger is ok?
I have to downgrade to FF 93 4 days before. Not sure when the debugger stops working, I am switching from C# to Typescript after 2 months.

@JSteitz
Copy link

JSteitz commented Apr 3, 2022

I'm using Rollup with source maps as a file.
Shouldn't matter whether it is webpack or not.
Maybe your path mappings are incorrect.

Did you try the path mappings wizard to set them?

@sxc731
Copy link

sxc731 commented Apr 18, 2022

I had a similar issue and eventually became a little suspicious over the fact that my IDE was reporting Debugger for Firefox version as v2.9.1 (in the top header); even though further down in the README.md (ostensibly fetched from Github), the badge says v2.9.6!

I am using VSCodium and rather a noob at this IDE. I eventually figured out that it's using a different extensions marketplace to VSCode. I raised the issue with OpenVSX registry.

If you are in the same case, you can manually install the correct version by downloading a .vsix archive from the M$ marketplace and install it manually into VSCodium.

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

No branches or pull requests

5 participants