microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
718 stars 242 forks source link

Attaching to the next WebServiceClient fails with "Invalid debug adapter" #7770

Closed dannoe closed 2 weeks ago

dannoe commented 3 weeks ago

1. Describe the bug I try to attach to the next WebServiceClient. If I trigger the webservice call, the debugger just stops and there is a log entry in the "extension host" window in vscode.

2. To Reproduce Steps to reproduce the behavior: Have a workspace file with the following launch/configurations settings:

{
  "name": "Attach: sandbox-test (WebService)",
  "type": "al",
  "request": "attach",
  "tenant": "<tenant-id>",
  "environmentType": "Sandbox",
  "environmentName": "sandbox-test",
  "breakOnError": "All",
  "breakOnRecordWrite": "None",
  "breakOnNext": "WebServiceClient",
  "userId": "USER ID"   
}

Run: "AL: Debug without publishing"

3. Expected behavior Debugging should work

4. Actual behavior The following log entry occurs in vscode, as soon as the webservice call is triggered.

2024-06-13 17:20:20.593 [error] Error: Invalid debug adapter
    at l.p (vscode-file://vscode-app/c:/Users/username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1769:95)
    at l.$acceptDAExit (vscode-file://vscode-app/c:/Users/username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1769:35)
    at y.S (vscode-file://vscode-app/c:/Users/username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1658:14598)
    at y.Q (vscode-file://vscode-app/c:/Users/username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1658:14364)
    at y.M (vscode-file://vscode-app/c:/Users/username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1658:13397)
    at y.L (vscode-file://vscode-app/c:/Users/username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1658:12453)
    at u.value (vscode-file://vscode-app/c:/Users/username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1658:10928)
    at h.y (vscode-file://vscode-app/c:/Users/username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:89:659)
    at h.fire (vscode-file://vscode-app/c:/Users/username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:89:876)
    at r.fire (vscode-file://vscode-app/c:/Users/username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:615:14848)
    at U.onmessage (vscode-file://vscode-app/c:/Users/username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1673:8154)

5. Versions:

Internal work item: AB#538498

kalberes commented 2 weeks ago

I have no repro on this? On the other hand it looks like a vscode issue? Have you tried with the experimental vscode? Whether that also reproes? I have seen traces of similar issues on teh vscode branch: https://github.com/microsoft/vscode/issues/196948

dannoe commented 2 weeks ago

I haven't changed anything and it works again. Maybe it was a temporary problem.