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

Clicking on Firefox in VS Code > Debugger > Run and Debug does nothing #314

Open
TomasHubelbauer opened this issue Jan 6, 2023 · 2 comments

Comments

@TomasHubelbauer
Copy link

Hi! Thanks for the cool extension.

I installed it and went to a project which had no debugger configurations yet. I went to the Debugger ("Run and Debug") pane in VS Code and clicked the Run and Debug button with my index.html selected.

I did not see the Firefox option there. I assume this option should be there and when clicked, it should create a barebones pre-defined debugger configuration. When I selected index.js instead, Firefox still wasn't listed among the available debuggers.

When I go to the Extensions pane, select the Debugger for Firefox extension (such that a new tab opens with the extension detail) and then switch back to the Run and Debug pane and press the same button again, the Firefox option is in the list of options, but clicking on it does nothing:

Screen.Recording.2023-01-06.at.23.14.44.mov

I think what should happen is that this option shows for index.html and when clicked, creates a barebones .vscode/launch.json and opens it.

What I did to work around this was to select index.html, use VS Code to generate a Chrome configuration and then replace its content with the snippet in the extension's README:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch index.html",
            "type": "firefox",
            "request": "launch",
            "reAttach": true,
            "file": "${workspaceFolder}/index.html"
        }
    ]
}

This works but I think it can be improved by making the suggested debugger option work.

@WebMechanic
Copy link

if you pick "Add Config (workspace)" from the Run and Debug dropdown it should open the Command Palette where you can choose the debugger target (those being enabled).
image

Pick "Firefox" and you get a whole set of default debug profiles for you in your workspace file:

{
	"name": "Launch index.html",
	"type": "firefox",
	"request": "launch",
	"reAttach": true,
	"file": "${workspaceFolder}/index.html"
},
{
	"name": "Launch localhost",
	"type": "firefox",
	"request": "launch",
	"reAttach": true,
	"url": "http://localhost/index.html",
	"webRoot": "${workspaceFolder}"
},
{
	"name": "Attach",
	"type": "firefox",
	"request": "attach"
},
{
	"name": "Launch WebExtension",
	"type": "firefox",
	"request": "launch",
	"reAttach": true,
	"addonPath": "${workspaceFolder}"
}

@sonvirgo
Copy link

same here
Attach configuration ok with all firefox setting in about:config and pre-lunch firefix with debug switch
Lauch configuration other while never works
"Can not load your profile bla bla ..."

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

3 participants