AdrianeZ - programuj
AdrianeZ - programuj

Reputation: 263

I can't run Chrome Debugger in VS Code on Linux Mint

Hi I've got a problem to run Chrome Debugger directly in VS Code. I'm working on Linux Mint. This is how my launch.json file looks like:

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
   
   
    {
        "type": "pwa-chrome",
        "request": "launch",
        "name": "Launch Chrome against localhost",
        "file": "${workspaceFolder}/index.html"
        
        
      
    }
]

}

Now i try to run debugger and error message says: Unable to launch browser: "Unable to find Chrome version stable. Available auto-discovered versions are: ["dev"]. You can set the "runtimeExecutable" in your launch.json to one of these, or provide an absolute path to the browser executable."

Following the sugesstion I've added runtimeExecutable to chrome executable like this:

runtimeExecutable:"/opt/google/chrome/google-chrome" and now error message says:

Unable to Attach to the browser.

Google Chrome is installed on my machine version: 83.0.4103.116-1.

Thanks for help in advance

Error Current Config

Upvotes: 0

Views: 5923

Answers (2)

Fabio
Fabio

Reputation: 33

I'm also using Chromium on Linux Mint. I solved the problem with

debug.javascript.usePreview: false in VS settings,

as explained in This answer

Upvotes: 2

tHeSiD
tHeSiD

Reputation: 5333

You need to add the webroot property too try this

{
    "name": "Launch Chrome",
    "request": "launch",
    "type": "pwa-chrome",
    "url": "${workspaceFolder}/index.html",
    "webRoot": "${workspaceFolder}"
},

Upvotes: 1

Related Questions