firefox-devtools / vscode-firefox-debug

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

Error: Invalid debug adapter #370

Open rubensa opened 1 week ago

rubensa commented 1 week ago

Environment:

Running using VSCode Devcontainers on Ubuntu Docker container (remote development).

The problem:

If I set breakpoints in VSCode on a TypeScript file (Angular app) the browser does not stop on it.

The log:

On VSCode Developer Tools console I can see the following error:

ERR Invalid debug adapter: Error: Invalid debug adapter at b4t.p (vscode-file://vscode-app/opt/VSCode-linux-x64-1.95.0/resources/app/out/vs/workbench/workbench.desktop.main.js:615:95) at b4t.$acceptDAExit (vscode-file://vscode-app/opt/VSCode-linux-x64-1.95.0/resources/app/out/vs/workbench/workbench.desktop.main.js:615:35) at Pht.S (vscode-file://vscode-app/opt/VSCode-linux-x64-1.95.0/resources/app/out/vs/workbench/workbench.desktop.main.js:3124:41686) at Pht.Q (vscode-file://vscode-app/opt/VSCode-linux-x64-1.95.0/resources/app/out/vs/workbench/workbench.desktop.main.js:3124:41464) at Pht.M (vscode-file://vscode-app/opt/VSCode-linux-x64-1.95.0/resources/app/out/vs/workbench/workbench.desktop.main.js:3124:40552) at Pht.L (vscode-file://vscode-app/opt/VSCode-linux-x64-1.95.0/resources/app/out/vs/workbench/workbench.desktop.main.js:3124:39789) at vZ.value (vscode-file://vscode-app/opt/VSCode-linux-x64-1.95.0/resources/app/out/vs/workbench/workbench.desktop.main.js:3124:38450) at x.B (vscode-file://vscode-app/opt/VSCode-linux-x64-1.95.0/resources/app/out/vs/workbench/workbench.desktop.main.js:30:747) at x.fire (vscode-file://vscode-app/opt/VSCode-linux-x64-1.95.0/resources/app/out/vs/workbench/workbench.desktop.main.js:30:965) at L6.fire (vscode-file://vscode-app/opt/VSCode-linux-x64-1.95.0/resources/app/out/vs/workbench/workbench.desktop.main.js:630:10348)

Detailed info:

If I open the Firefox Web Developer Tools there seems to be no breakpoints set.

If I add a breakpoint in VSCode I can see something like this in the log:

DEBUG|236.222|BreakpointsManager: Setting 1 breakpoints for vscode-remote://dev-container%2B7b22686f737450617468223...227d7d/workspaces/app/module/src/modules/module/pages/page/page.page.ts

but the breakpoint does not appear on Firefox Web Developer Tools. When this breakpoint should be reached Firefox does not stops execution.

If I add a breakpoint on Firefox Web Developer Tools I can't see any notification sent to the server for the new break point in the log. When this breakpoint is reached Firefox stops execution there but it can be debugged only on Firefox Web Developer Tools not on VSCode.

rubensa commented 5 days ago

This seems to have been fixed on VSCode 1.95.2. See: https://github.com/microsoft/vscode/issues/232730

rubensa commented 5 days ago

Too fast... Still not working. Same behavior as already stated and now using Firefox 132.0.1, VSCode 1.95.2 and Debugger for Firefox v2.9.11.

hbenl commented 5 days ago

Thanks for linking to the upstream issue. That issue and its duplicates (microsoft/vscode#232651 links to many of those) have been closed but many users are reporting that the issue still isn't fixed.

rubensa commented 5 days ago

@hbenl In my case the Chrome issue is fixed but the Firefox issue not.

The different here is that in case of Chrome, the browser is installed inside the Docker dev container but in case of Firefox it is on the host.

The pointed upstream issues are about Chrome freeze when there are breakpoints set and the one reported here is about Firefox not stopping at any breakpoint set in VSCode (when using a Docker devcontainer).

hbenl commented 5 days ago

In my case the Chrome issue is fixed but the Firefox issue not.

Hmm, so maybe these are different issues after all. Unfortunately I couldn't reproduce this, have you tried with VS Code 1.94?

rubensa commented 1 day ago

@hbenl Tried with 1.94 (rebuilding the container as I found extension incompatibilities on VSCode version downgrade) with same results.

In the meantime I also tried with Microsoft Edge in the host and is working as expected. So only Firefox does not stop on breakpoints.

NOTE: I'll say that I'm working in a legacy Ruby on Rails app with an Angular frontend build with Ionic using Gulp.