firefox-devtools / vscode-firefox-debug

VS Code Debug Adapter for Firefox
https://marketplace.visualstudio.com/items?itemName=firefox-devtools.vscode-firefox-debug
MIT License
397 stars 66 forks source link

Firefox on launch not opening debug URL #351

Closed 0xff8 closed 9 months ago

0xff8 commented 9 months ago

Whenever I start debugging on my MacOS , the Firefox Developer Edition getting launched, but the url defined in the launch.json config not opened. So I always have to manually type it in the url field. Could you suggest me what is wrong?

Here is my launch json:

{
    "version": "0.2.0",
    "configurations": [
      {
        "type": "firefox",
        "request": "launch",
        "name": "client: firefox",
        "url": "http://localhost:3000",
        "reAttach": true,
        "webRoot": "${workspaceFolder}"
      },
      {
        "command": "npm run dev",
        "name": "Run npm dev",
        "request": "launch",
        "type": "node-terminal"
      }
    ]
}
nchevobbe commented 9 months ago

From the documentation, about url:

These properties are used to map urls to local files

So it's not meant to open a tab with the specified URL. For that, I think you can use firefoxArgs, which from a quick test seems to do what you want:

      {
        "type": "firefox",
        "request": "launch",
        "name": "client: firefox",
        "url": "http://localhost:3000",
        "firefoxArgs": ["http://localhost:3000"],
        "reAttach": true,
        "webRoot": "${workspaceFolder}"
      },
nchevobbe commented 9 months ago

I'm going to close the issue, but feel free to reopen it if the provided solution doesn't work for you