Skip to content

AL debugger fails on BC 29 sandbox: DebuggerHub negotiate returns 400 – tenant/deploymentId/sessionId/userid missing from query (AL 18.1.2842859, debugger 9.0) #8355

Description

@ShreyChauhan29

Summary
After our BC SaaS sandbox was updated to BC 29, publishing from VS Code works,
but starting a debug session (F5, "request": "launch") always fails with:

Error: Failed to establish SignalR hub connection due to: Response status code
does not indicate success: 400 (Bad Request).

Environment

  • Business Central: IN Business Central 29.0 (Platform 29.0.55857.0 + Application 29.0.54011.55935)
  • Environment type: SaaS Sandbox
  • Server reports: Runtime 18.0, Web API 7.0, Debugger 9.0
  • AL Language extension: 18.1.2842859 (ALLanguage.vsix taken from BC artifact
    sandbox/29.0.54011.56119/platform; its DebuggerVersions.All includes 9.0)
  • VS Code 1.141.0, Windows 11 (10.0.26200)

Version history

  • Marketplace AL 18.0.2819426 and pre-release 30.0.2813176 cannot connect at all:
    "This AL extension version ... cannot be used with the specified server"
    (supported debuggers only up to 8.0, server requires 9.0).
  • AL 18.1.2825563 (from the sandbox's own artifact 29.0.54011.55935) supports
    debuggers only up to 7.0, same error.
  • AL 18.1.2842859 passes the version check and publishes successfully, but the
    debugger hub connection fails with 400.

Steps to reproduce

  1. launch.json: "request": "launch", "environmentType": "Sandbox",
    "environmentName": "", "tenant": ""
  2. Press F5.
  3. The package publishes successfully, then the debug session ends with the
    SignalR 400 error above.

Analysis (from DebuggerServices.log in the AL extension's bin folder)
The negotiate request is sent with an empty query string apart from the
Authentication parameter:

[EstablishingConnection] Establishing connection with server at
'https://api.businesscentral.dynamics.com/v2.0//dev/DebuggerHub?&Authentication=[bearer token]'
[UnsuccessfulHttpResponse] Unsuccessful HTTP response 400 return from POST
'https://api.businesscentral.dynamics.com/v2.0//dev/DebuggerHub/negotiate?&Authentication=[bearer token]'
[ErrorWithNegotiation] Failed to start connection. Error getting negotiation response

HubBasedDebuggerService.OpenConnectionAsync is supposed to add the query
parameters tenant, deploymentId, sessionId and userid (from
DebuggerConnectionParameters), but all of them are missing. Publishing does
succeed, but it does not seem to return the debugger connection parameters the
client expects, so the hub rejects the negotiation.

Already ruled out

  • Authentication: token acquired for the correct tenant, publishing works;
    tried al.useVsCodeAuthentication true/false.
  • "useMcpServerForDebugging": false in launch.json: no change.
  • Proxy/firewall: none (WinHTTP direct access, no proxy settings).
  • Stale sessionId in attach configs: removed, no change.

Timestamps / correlation (IST, UTC+05:30)

  • 2026-10-10 13:06:12, publish request ID 50c3d4a7-b0f1-4f5e-8058-2da59861bdbe,
    session ID 96c659fd-2151-417d-88af-b8f88d240177
  • 2026-10-10 13:06:32, SignalR hub connection failed (400)
  • Earlier occurrence: 2026-10-10 13:04:08, request ID ab4a3e84-fc2c-4e1a-a5e6-6e287e56b972,
    session ID 68f10a98-339b-4f1c-b1e0-196d62810e4a

Expected
The debugger attaches after publishing, as it did before the BC 29 update.

Request
Please confirm whether a matching AL Language extension / server fix is
planned for debugger protocol 9.0, or provide a workaround.

Image

DebuggerServices.log
launch.json
Internal work item: AB#653826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions