question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unverified breakpoint debugging vue.js webpack app

See original GitHub issue

Description

I followed this guide to setup debugging. However the breakpoints are not working.
this is my launch.json file

...
{
     "type": "firefox",
      "request": "launch",
      "reAttach": true,
      "name": "Launch Vue App",
      "url": "http://localhost:8080/",
      "webRoot": "${workspaceFolder}/src",
      "pathMappings": [
        { "url": "webpack:///src/*", "path": "${webRoot}/*" }
      ]
}
...

and my config/index.js

module.exports = {
  dev: {
    ...
    devtool: 'source-map',
    ...

Specifications

  • vue-cli: 2.9
  • firefox: 61.0.1 (Ubuntu edition)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Michael-Liaocommented, Sep 1, 2019

thanks for the help, didn’t know that some of the webpack source maps where broken. The following is a working example: lauch.json

"version": "0.2.0",
  "configurations": [
    {
      "type": "firefox",
      "request": "launch",
      "reAttach": true,
      "name": "Launch Vue App",
      "firefoxExecutable": "/home/michael/firefox-dev/firefox",
      "url": "http://localhost:8080/",
      "webRoot": "${workspaceFolder}/src",
      "pathMappings": [
        {
          "url": "webpack:///src/",
          "path": "${webRoot}"
        }
      ],
      "skipFiles": [ // optional
        "${workspaceFolder}/node_modules/**"
      ]
    }
  ]

config/index.js shouldn’t be modified. While breakpoints work now, it still reacts weird in single file components.

1reaction
hbenlcommented, Jul 27, 2018

Your pathMappings are incorrect, this debug adapter doesn’t use the same syntax as the Chrome debug adapter: remove the * at the end of url and path. In general, the most reliable way of creating pathMappings is through the “Map to local directory” context menu entry in the Loaded Scripts Explorer.

devtool: 'source-map'

I’m not sure what this means, but if this is the configuration of the webpack devtool (that’s what it looks like), you should try switching to a different option because some webpack devtool options are broken, see webpack/webpack#5491.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unverified breakpoint debugging vue.js webpack app #85
Description I followed this guide to setup debugging. However the breakpoints are not working. this is my launch.json file .
Read more >
Debug Vue.js App with VS Code. Error Unverified Breakpoint
When I try npm run serve I get the error message unverified breakpoint and my breakpoint is never be hit. I use the...
Read more >
Debug Vue.js App with VS Code. Error Unverified Breakpoint ...
For me my webroot folder was not set correctly. My vue files browser is set to: D:\Workspace. The project is in that folder...
Read more >
“Unverified Breakpoints” when using VS debugger on Vue ...
Problem: I'm getting unverified breakpoints when I set them in my TS files and Vue components while running VS debugger.
Read more >
vscode unverified breakpoint golang
Open the App.component.ts file in Visual Studio Code and add a breakpoint inside of the component by clicking in the area to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found