microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.42k stars 29.34k forks source link

Invalid debug adapter #196948

Open vscodenpa opened 1 year ago

vscodenpa commented 1 year ago
Error: Invalid debug adapter
at v.m in src/vs/workbench/api/browser/mainThreadDebugService.ts:346:10
at v.$acceptDAError in src/vs/workbench/api/browser/mainThreadDebugService.ts:336:8
at p.S in src/vs/workbench/services/extensions/common/rpcProtocol.ts:456:17
at p.Q in src/vs/workbench/services/extensions/common/rpcProtocol.ts:441:32
at p.M in src/vs/workbench/services/extensions/common/rpcProtocol.ts:371:19
at p.L in src/vs/workbench/services/extensions/common/rpcProtocol.ts:297:10
at u.value in src/vs/workbench/services/extensions/common/rpcProtocol.ts:161:42
at f.y in src/vs/base/common/event.ts:1140:13
at f.fire in src/vs/base/common/event.ts:1171:9
at s.fire in src/vs/base/parts/ipc/common/ipc.net.ts:650:19
at Q.onmessage in src/vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost.ts:581:40

Go to Errors Site

DanTup commented 11 months ago

I'm seeing loads of these errors on my bots when running tests (Windows, stable) but as far as I can tell it's not actually affecting the tests.

when running tests by name
      ✔ runs a Dart test script to completion
Cannot read properties of undefined (reading 'item'): TypeError: Cannot read properties of undefined (reading 'item')
    at y (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1149:12641)
    at async vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1149:73961
      ✔ can run tests from codelens
Invalid debug adapter: Error: Invalid debug adapter
    at v.m (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1552:95)
    at v.$acceptDAExit (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1552:35)
    at $.S (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1560:18856)
    at $.Q (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1560:18622)
    at $.M (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1560:17715)
    at $.L (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1560:16933)
    at u.value (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1560:15597)
    at f.y (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902)
    at f.fire (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119)
    at s.fire (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:616:[143](https://github.com/Dart-Code/Dart-Code/actions/runs/7014924026/job/19083421139#step:34:144)96)
    at Q.onmessage (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1655:1077)
Cannot read properties of undefined (reading 'item'): TypeError: Cannot read properties of undefined (reading 'item')
    at y (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1[149](https://github.com/Dart-Code/Dart-Code/actions/runs/7014924026/job/19083421139#step:34:150):12641)
    at async vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1149:73961
      ✔ can run tests from codelens with greater than

I'm not sure if it's related, but there's a different error at the bottom there:

Cannot read properties of undefined (reading 'item'): TypeError: Cannot read properties of undefined (reading 'item')
    at y (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1[149](https://github.com/Dart-Code/Dart-Code/actions/runs/7014924026/job/19083421139#step:34:150):12641)
    at async vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:1149:73961
DanTup commented 11 months ago

Note: I can repro the same locally, it's not isolated to the bots.

roblourens commented 11 months ago

FYI @connor4312 the 'item' error deminifies to here

https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/testing/common/testService.ts#L163

at ./common/testService.ts:163:12
./browser/testingDecorations.ts:509:20
andrew-laughlin commented 10 months ago

I can repro a related error fairly consistently. I say "fairly" because sometimes debugging works, and I don't know why. i.e. My breakpoints get hit, as opposed to saying "unverified breakpoint". I'm writing PHP and have the XDebug v1.34.0 (PHP Debug) extension installed.

Version: 1.85.1 Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2 Date: 2023-12-13T09:47:11.635Z Electron: 25.9.7 ElectronBuildId: 25551756 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Linux x64 5.10.0-27-amd64

Repro steps:

  1. In VSCode click "Listen for Xdebug" to launch a debug session. Debug console shows ... "Listening to Xdebug on port 0.0.0.0:9003 ..."
  2. Manually click an item in the web browser. The browser connects to Local (which hosts a Wordpress site) and connects to Xdebug.
  3. Sometimes the breakpoints will hit. More often than not however, once the browser makes the request, I get the following error in the VSCode dev tools:

ERR Cannot read properties of undefined (reading 'getViewState'): TypeError: Cannot read properties of undefined (reading 'getViewState') at Lt.Dc (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2595:135717) at Lt. (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2595:126557) at u.y (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902) at u.z (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1972) at u.fire (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2188) at S.flush (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:764:45961) at o.value (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2342:142576) at u.y (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902) at u.z (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1972) at u.fire (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2188) at vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:85:54014 at o.value (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:85:54171) at u.y (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902) at u.fire (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119) at o.value (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:85:53809) at u.y (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902) at u.fire (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119) at o.value (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:85:54014) at u.y (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902) at u.fire (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119) at ne (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:616:721) at M.t (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:616:1511) at M.s (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:616:1405)

at o.value (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:615:1340)
at u.y (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902)
at u.z (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1972)
at u.fire (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2188)
at Function.ue (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:85:56462)

log.ts:441 ERR Cannot read properties of undefined (reading 'getViewState'): TypeError: Cannot read properties of undefined (reading 'getViewState') at Lt.Dc (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2595:135717) at Lt. (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2595:126557) at u.y (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902) at u.z (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1972) at u.fire (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2188) at S.flush (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:764:45961) at vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:764:44268

  1. In VSCode, click to stop the debugging session. The following error is output in the VSCode dev tools:

ERR Invalid debug adapter: Error: Invalid debug adapter at v.m (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1553:95) at v.$acceptDAError (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1552:7629) at m.S (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1561:18889) at m.Q (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1561:18655) at m.M (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1561:17748) at m.L (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1561:16827) at o.value (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1561:15630) at u.y (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902) at u.fire (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119) at s.fire (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:616:14449) at x.onmessage (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1657:7802)

zobo commented 10 months ago

I'm continuing here from #202003. I've setup a Linux VM to help me analyze the issue. As reported there are two thrown errors (Invalid debug adapter) that happen in getDebugAdapter first as a result of $acceptDAExit and second because of $acceptDAError.

Poking a bit around git history I think the problem comes from removing the _debugAdapters entry too early.

In my case, the events go roughly like this:

  1. User clicks stop debug
  2. actionbar actionViewItem onClick fires and calls debugCommands stopHandler
  3. stopHandler calls debugSession.stopSession
  4. calls DebugSession.terminate
  5. calls RawDebugSession.disconnect
  6. calls RawDebugSession.shutdown
  7. calls RawDebugSession.stopAdapter and then fireAdapterExitEvent
  8. calls DebugSession.onDidExitAdapter
  9. calls onDidEndAdapter in DebugService
  10. calls onDidEndSession in MainThreadDebugService that deletes the debug adapter.

This is then followed by RPC calls like $acceptDAError (some socket read error). $acceptDAExit (normal exit of the DA process) that all result in errors because the debug adapter object is gone.

Where to actually delete the entry is beyond me - unless I invest more time into understanding the whole debug service and main proc/ext host architecture...

Hope this helps.

DanTup commented 9 months ago

FWIW, I feel like this is happening a lot more lately. I see it both in Dart projects and TypeScript (VS Code extension) projects. When it happens, the debug toolbar disappears even when I'm in a debug session, and pressing F5 no longer starts a new session (I have to use the menu or button on the sidebar).

anhallbe commented 8 months ago

Not sure if related to this error, but my debugger ({ "type": "chrome", "request": "launch" }) just suddenly stopped working completely a few days ago, and I haven't been able to successfully start it since.

When started, the browser launches but tabs are just empty and loading. Trying to launch new tabs (or settings, about etc) fails similarly. Just emptiness except for a loading spinner. The same happens with {"request": "attach"}.

I have tried:

I can see the mentioned error in the Window log output.

Running on macOS Sonoma 14.3.1 (M1)

jamie-pate commented 8 months ago

When I got this error using I removed noDebug: true and there were some breakpoints inside the node internals..

Removing "noDebug" allowed it to break on these breakpoints and I removed them.

re-enabling "noDebug" causes it to print the error and hang again

{
            "type": "node",
            "runtimeVersion": "18.18.2",
            "request": "launch",
            "cwd": "${workspaceFolder}/client",
            "program": "${workspaceFolder}/client/node_modules/@angular/cli/bin/ng.js",
            "args": [
                "serve",
                "projectname",
                "--proxy-config",
                "proxy.conf.json"
            ],
            "skipFiles": ["<node_internals>/**"],
            "preLaunchTask": "npm: build - common",
            "console": "internalConsole",
            "outputCapture": "std",
            "noDebug": true
}
roblourens commented 8 months ago

Can you share logs?

/jsDebugLogs

vscodenpa commented 8 months ago

Please collect trace logs using the following instructions:

If you're able to, add "trace": true to your launch.json and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.

⚠️ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to connor@xbox.com

PetrLaskevic commented 8 months ago
Error: Invalid debug adapter
at v.m in src/vs/workbench/api/browser/mainThreadDebugService.ts:346:10
at v.$acceptDAError in src/vs/workbench/api/browser/mainThreadDebugService.ts:336:8
at p.S in src/vs/workbench/services/extensions/common/rpcProtocol.ts:456:17
at p.Q in src/vs/workbench/services/extensions/common/rpcProtocol.ts:441:32
at p.M in src/vs/workbench/services/extensions/common/rpcProtocol.ts:371:19
at p.L in src/vs/workbench/services/extensions/common/rpcProtocol.ts:297:10
at u.value in src/vs/workbench/services/extensions/common/rpcProtocol.ts:161:42
at f.y in src/vs/base/common/event.ts:1140:13
at f.fire in src/vs/base/common/event.ts:1171:9
at s.fire in src/vs/base/parts/ipc/common/ipc.net.ts:650:19
at Q.onmessage in src/vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost.ts:581:40

Go to Errors Site

I've seen a similar error (same error message, different line locations) when trying to run node.js Javascript:

ERR Invalid debug adapter: Error: Invalid debug adapter
    at h.p (vscode-file://vscode-app/c:/Users/Andrey/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1877:95)
    at h.$acceptDAError (vscode-file://vscode-app/c:/Users/Andrey/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1876:15492)
    at g.S (vscode-file://vscode-app/c:/Users/Andrey/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1609:13967)
    at g.Q (vscode-file://vscode-app/c:/Users/Andrey/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1609:13733)
    at g.M (vscode-file://vscode-app/c:/Users/Andrey/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1609:12826)
    at g.L (vscode-file://vscode-app/c:/Users/Andrey/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1609:11905)
    at l.value (vscode-file://vscode-app/c:/Users/Andrey/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1609:10692)
    at o.y (vscode-file://vscode-app/c:/Users/Andrey/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902)
    at o.fire (vscode-file://vscode-app/c:/Users/Andrey/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119)
    at r.fire (vscode-file://vscode-app/c:/Users/Andrey/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:624:14439)
    at V.onmessage (vscode-file://vscode-app/c:/Users/Andrey/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1632:7759)

For me, steps to reproduce are:

  1. Open a directory with JS files (already existing before opening VS Code) using code .
  2. Select one of the files which only has console.log("hello world"); in it
  3. If I select "Run" => "Start Debugging" it prints "hello world" correctly, but if I select "Run Without Debugging", it does not print anything, and the strip with restart / stop buttons stays open.
  4. If I press the button stop twice (until the strip disappears), I see the aforementioned message in VS Code Developer Tools
unbornchikken commented 8 months ago

VS Code 1.87.2

It happens to me as well, if I just hit CTRL+F5 instead of F5, nothing happens but the debugger toolbar with the button appears. It works like this in any of my Node.js project. Actually I should hit the stop button twice to get the toolbar disappeared.

2024-03-19 09:46:02.719 [error] Invalid debug adapter: Error: Invalid debug adapter at h.p (vscode-file://vscode-app/c:/Users/gmezo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1877:95) at h.$acceptDAError (vscode-file://vscode-app/c:/Users/gmezo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1876:15492) at g.S (vscode-file://vscode-app/c:/Users/gmezo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1609:13967) at g.Q (vscode-file://vscode-app/c:/Users/gmezo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1609:13733) at g.M (vscode-file://vscode-app/c:/Users/gmezo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1609:12826) at g.L (vscode-file://vscode-app/c:/Users/gmezo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1609:11905) at l.value (vscode-file://vscode-app/c:/Users/gmezo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1609:10692) at o.y (vscode-file://vscode-app/c:/Users/gmezo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902) at o.fire (vscode-file://vscode-app/c:/Users/gmezo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119) at r.fire (vscode-file://vscode-app/c:/Users/gmezo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:624:14439) at V.onmessage (vscode-file://vscode-app/c:/Users/gmezo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1632:7759)

DanTup commented 5 months ago

Slightly different to my previous report above, I saw this today where clicking the Stop button didn't terminate the debug session (even after multiple clicks... the second click should be a force termination, regardless of what the DA is doing). In the console is has this same error:

image

aiday-mar commented 4 months ago

Error received over 500 times on Insiders 1.92 (according to telemetry). The corresponding issue will be triaged.

vs-code-engineering[bot] commented 3 months ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

DanTup commented 3 months ago

@aiday-mar the bot closed this because it has needs-info, but it sounds like you have crash reports for it. Could it be re-opened, and can you confirm if you still need more details about this?

It's difficult to repro because it's quite sporadic. I think it would be better if the code that threw this error ("Invalid debug adapter") could include more context about what exactly this means or what it was trying to do.

aiday-mar commented 3 months ago

Hi @DanTup yes this issue still happens to this day. Unfortunately I do not have crash reports for this, as the error comes from our internal telemetry. I will reopen this issue. @roblourens would know more about the information needed to fix this issue.

DanTup commented 3 months ago

I see significant number of this error in Insiders today on my GitHub actions while running tests:

https://github.com/Dart-Code/Dart-Code/actions/runs/10160187215/job/28096047176

[10:41:44 AM] [General] [Warn] Could not find suite for test 1330 for session session-76a9b
      ✔ runs all tests if given a folder
Invalid debug adapter: Error: Invalid debug adapter
    at c.p (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2012:95)
    at c.$acceptDAExit (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2012:35)
    at S (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1903:14635)
    at S.Q (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1903:14401)
    at S.M (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1903:13434)
    at S.L (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1903:12490)
    at u.value (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1903:10964)
    at o.B (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:93:732)
    at o.fire (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:93:949)
    at s.fire (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:123:15085)
    at K.onmessage (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1919:8198)
[10:41:57 AM] [General] [Warn] Could not find suite for test 1330 for session session-ab42a
Invalid debug adapter: Error: Invalid debug adapter
    at c.p (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2012:95)
    at c.$acceptDAExit (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2012:35)
    at S (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1903:14635)
    at S.Q (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1903:14401)
    at S.M (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1903:13[434](https://github.com/Dart-Code/Dart-Code/actions/runs/10160187215/job/28096047176#step:34:435))
    at S.L (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1903:12490)
    at u.value (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1903:10964)
    at o.B (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:93:732)
    at o.fire (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:93:949)
    at s.fire (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:123:15085)
    at K.onmessage (vscode-file://vscode-app/d:/a/Dart-Code/Dart-Code/.vscode-test/vscode-win32-x64-archive-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1919:8198)
      ✔ can run nested projects through Test: Run All Tests (13713ms)
      ✔ can run tests through test controller using default launch template

If there's a way to collect logs into a stable location that I can have attached as artifacts for GH runs, please let me know and I will collect them and provide them here.

ybizeul commented 2 months ago

Hitting this error as well.

What's extremely weird is that it only fails with a particular go code, i.e. :

# This works
    slog.Info("HTTP Request",
        //slog.String("remote_ip", r.RemoteAddr),
        slog.String("method", r.Method),
        slog.String("path", r.URL.Path),
    )

# This works :
    slog.Info("HTTP Request",
        slog.String("remote_ip", r.RemoteAddr),
        //slog.String("method", r.Method),
        //slog.String("path", r.URL.Path),
    )

# This doesn't work 🤷‍♂️ :
    slog.Info("HTTP Request",
        slog.String("remote_ip", r.RemoteAddr),
        slog.String("method", r.Method),
        slog.String("path", r.URL.Path),
    )

It's not a code error, this code is valid go code and no null pointer or anything. In fact, this code can't even be reached at this point of the execution.

Here is the complete error in Output > Window and I can reproduce at will.

2024-08-31 20:40:17.678 [error] Invalid debug adapter: Error: Invalid debug adapter
    at c.p (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2012:95)
    at c.$acceptDAMessage (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2011:16481)
    at S (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1903:14635)
    at S.Q (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1903:14401)
    at S.M (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1903:13434)
    at S.L (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1903:12269)
    at u.value (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1903:10964)
    at o.B (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:93:732)
    at o.fire (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:93:949)
    at s.fire (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:123:15085)
    at K.onmessage (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1919:8198)
JustinGrote commented 2 weeks ago

Hitting this in Github Actions but not locally during tests that utilize a debug adapter. Here's the relevant log section