microsoft / microsoft/AL

al_publish LM tool hangs after successful full dependency tree publish when debug: false

Open
#8,280 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted al-tools bug
Dominant language
PowerShell
Stars
881
Forks
285
Avg merge
3d 36m
Merged PRs (30d)
1

Description

1. Describe the bug

When calling the al_publish LM tool with fulldependencytree: true and debug: false, the tool never returns after a successful publish. All projects are published successfully and "Done publishing the full dependency tree." is logged to the AL output channel, but the tool call hangs indefinitely.

2. To Reproduce

Steps to reproduce the behavior:

  1. Open a workspace with a multi-project AL solution.
  2. Invoke the al_publish LM tool via a GitHub Copilot agent with:
    • debug: false
    • fulldependencytree: true
    • Eg. write this in the copilot chat: call #al_publish with debug: false, fulldependencytree: true
  3. Observe the AL output channel ΓÇö all projects publish successfully.
  4. Observe the agent ΓÇö it hangs indefinitely after the last log line.

No AL code snippet required ΓÇö the issue is in the tool's command dispatch logic, not in AL source code.

3. Expected behavior

After all projects are published and "Done publishing the full dependency tree." is logged, the al_publish tool should return a result to the calling agent without starting a debug session, consistent with the behavior of debug: false in all other publish paths.

4. Actual behavior

The tool never returns. The AL output log ends with:

[2026-06-22 11:49:19.03] Success: The package 'Me_MyApp_27.9.0.0.app' has been published to the server.
[2026-06-22 11:49:19.03] Done publishing project 2 of 2: MyApp
[2026-06-22 11:49:19.03] Done publishing the full dependency tree.

No further output is produced and the agent never proceeds.

Root cause analysis

In executeCore (the LM tool), the debug parameter is respected for all publish paths except fulldependencytree: true:

// Incremental and standard paths: debug flag respected ✅
r === a.Incremental
  ? (c = t ? "al.incrementalPublish" : "al.incrementalPublishNoDebug")
  : (c = t ? "al.publish" : "al.publishNoDebug")

// Full dependency path: debug flag silently ignored ❌
u ? (c = "al.fullDependencyPublish")

al.fullDependencyPublish unconditionally calls initalizeDebugAdapterService.getDebugAdapterConfiguration() and passes it to the language server request (al/fullDependencyPublish). The language server publishes all projects but its LSP response is gated on a subsequent debug session start ΓÇö which never completes when debug: false was requested. The yield serverProxy.sendRequest(...) awaits forever.

There is no al.fullDependencyPublishNoDebug counterpart, which is the missing piece.

Suggested fix

Add an al.fullDependencyPublishNoDebug command (mirroring the existing al.publishNoDebug) and dispatch to it when fulldependencytree: true and debug: false.

5. Versions:

  • AL Language: 17.0.2273547 and 18.0.2498801
  • Visual Studio Code: 1.125.1
  • Business Central: 28.1.49838.51179
  • List of Visual Studio Code extensions that you have installed: N/A
  • Operating System:
    • Windows
    • Linux
    • MacOS
Final Checklist
  • Search the issue repository to ensure you are reporting a new issue
  • Reproduce the issue after disabling all extensions except the AL Language extension
  • Simplify your code around the issue to better isolate the problem

Internal work item: AB#648586

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at executeCore and trace the command selected for fulldependencytree alongside the existing al.publishNoDebug path. Compare the al.fullDependencyPublish command registration and the al/fullDependencyPublish request flow; done means debug:false returns the tool result after publishing without starting a debug session.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.