AL icon indicating copy to clipboard operation
AL copied to clipboard

When an error occurs while publishing an app, cancelling the dialog also clears the Debug Console

Open MODUSCarstenScholling opened this issue 3 months ago • 0 comments

1. Describe the bug When an error occurs while publishing an app, cancelling the dialog also clears the Debug Console. So the information what happened is removed. This behavior was different in older AL Language extensions.

2. To Reproduce

  • Open an AL-app in VSCode
  • Make a change that causes an installed app to fail compilation
  • Hit F5 in VSCode to compile and publish

Example Output/Error:

[2025-10-15 07:36:18.68] Publishing AL application using launch configuration 'launch-bc265de'.
[2025-10-15 07:36:18.83] Targeting server 'https://bc265de', server instance 'BC' and tenant 'default'.
[2025-10-15 07:36:18.83] Using user name and password authentication. User name used is: 'admin'.
[2025-10-15 07:36:18.84] Sending request to https://bc265de:7049/BC/dev/metadata?tenant=default
[2025-10-15 07:36:19.04] Publishing package to tenant 'default'
[2025-10-15 07:36:19.04] Targeting server 'https://bc265de', server instance 'BC' and tenant 'default'.
[2025-10-15 07:36:19.04] Using user name and password authentication. User name used is: 'admin'.
[2025-10-15 07:36:19.04] Sending request to https://bc265de:7049/BC/dev/apps?tenant=default&SchemaUpdateMode=forcesync&DependencyPublishingOption=default
[2025-10-15 07:38:01.02] Error: Unprocessable Entity
[2025-10-15 07:38:01.02] Error: Error: An error occured while processing the request.
Request ID: ec539609-b951-4832-a6ea-4a29d34a59ff
Session ID: 43b6d977-4d79-4421-91ce-46f7b636b15d

If you are targeting a cloud instance, supply these IDs if contacting Microsoft support.
[2025-10-15 07:38:01.02] The request for path /BC/dev/apps?tenant=default&SchemaUpdateMode=forcesync&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: Publishing failed due to 'Extension compilation failed
src/test/TTSchubidooManagement.Codeunit.al(520,19): error AL0132: 'Codeunit AA.BB.CC.DD."Schubidoo Management"' does not contain a definition for 'GetAllObjWithCaption''. The original extensions have been restored.

After that error, a popup is shown, asking to "Open 'launch.json'" or "Cancel".

[Window Title]
Visual Studio Code

[Content]
Could not publish the package to the server. See Visual Studio Code debug console for more details.

[Open 'launch.json'] [Cancel]

I am not interested in the launch.json, because I know there is no issue, so hitting Cancel.

3. Expected behavior Debug Console content is kept to show the error.

4. Actual behavior As soon as I hot cancel, some information pops up in the lower right of VSCode. Then the Debug Console is cleared and the following error is shown:

[Window Title]
Visual Studio Code

[Content]
No workspace folder found for launch configuration

[Open 'launch.json'] [Cancel]

5. Versions:

  • AL Language: 17.0.1825603
  • Visual Studio Code: 1.104.3
  • Business Central: 27.0
  • Operating System:
    • [X] Windows
    • [ ] Linux
    • [ ] MacOS

Internal work item: AB#610080

MODUSCarstenScholling avatar Oct 15 '25 05:10 MODUSCarstenScholling