1

I'm trying to get VS Code debugging of a React client app working where Chromium is the Snap package. I think I have everything configured properly except that I don't know how to tell VS Code how to launch a Snap.

The debug configuration has a setting for the absolute path to the chromium executable

"runtimeExecutable": "/usr/bin/chromium-browser"

Since this path doesn't exist, I get an error message of: Attribute 'runtimeExecutable' does not exist ('/usr/bin/chromium-browser').

I didn't think this would work, and it didn't, but I did try

"runtimeExecutable": "snap run chromium"

Full debug (launch.json) config

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome against localhost",
      "url": "http://localhost:3000/#",
      "webRoot": "${workspaceFolder}",
      "runtimeExecutable": "snap run chromium",
      "runtimeArgs": [
      "--new-window",
      "-user-data-dir=\"/${workspaceFolder}/DevProfile\"",
      "--remote-debugging-port=9222",
      "--disable-background-networking"
      ]
    }
  ]
}

So, given VS Code expects an absolute path to the executable to launch, is there a way to get it to launch the Chromium Snap or should I just install the traditional/non-snap Chromium?

1 Answer 1

2

Executables in snaps and exposed in /snap/bin. In the case of Chromium it's executable is /snap/bin/chromium.

1
  • thank you for this solution. VS Code debugging is now launching the chromium snap. Breakpoints are being ignored but I think that is another/separate issue.
    – klequis
    Jun 22, 2018 at 20:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .