Skip to content

Error on "Download Symbols" or "Publish" with multiple configurations in launch.json #4525

@rvanbekkum

Description

@rvanbekkum

Describe the bug
When I have a launch.json file with two configurations and I try to use the "AL: Download Symbols" command, I get an error saying "Could not download symbols. Please see the Visual Studio Code output log for more details.".
The output log then only reports: "Error: No server has been chosen".
If I try this a second time, then I will be prompted to select the instance I would like to use, and everything works as expected.

To Reproduce
First, have a launch.json with multiple configurations, e.g. (N.B. I have removed our server and instance names from this example):

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "al",
            "request": "launch",
            "name": "Config1",
            "server": "<myserver>",
            "serverInstance": "<config1_instance>",
            "authentication": "Windows",
            "startupObjectId": 30,
            "startupObjectType": "Page",
            "breakOnError": true,
            "breakOnRecordWrite": false,
            "schemaUpdateMode": "Synchronize"
        },
        {
            "type": "al",
            "request": "launch",
            "name": "Config2",
            "server": "<myserver>",
            "serverInstance": "<config2_instance>",
            "authentication": "Windows",
            "startupObjectId": 30,
            "startupObjectType": "Page",
            "breakOnError": true,
            "breakOnRecordWrite": false,
            "schemaUpdateMode": "Synchronize"
        }
    ]
}

(If you want to, you can restart VSCode after this change, but it does not make a difference.)
Then press Ctrl + Shift + P and choose "AL: Download Symbols" from the command palette.
You will shortly see the prompt pop up, but it closes immediately, so you won't be able to make a selection. After this you will get the error described above.
If you try this a second time, it works as expected.

This happens at least every time you reopen VSCode and try to run this command.

The same happens when you try to Publish, for which you would expect to be prompted to select a configuration, but instead you'll get a similar error.

All my colleagues are experiencing the same bug.

Expected behavior
I would expect it to work the first time that I try to run the command, prompting me for the instance that I would like to use, like it does when I try to run this command a second time.

Versions:

  • AL Language: 2.1.79379
  • Business Central: W1 13.3 (27233)

  • VSCode: 1.30.2

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