Multiple configurations in launch.json are no longer supported in v5.0.236243
Describe the bug In v5.0.236243 of the AL Language extension in VS Code, the user is no longer queried for which configuration to use when there are multiple configurations, when publishing the app or downloading symbols. (This was working just fine in v4 of the AL Language extension.)
To Reproduce Steps and to reproduce the behavior:
- Create a launch.json file with more than one configuration
- Download symbols or publish app
- The editor does not ask for which configuration to use, it just picks one (I haven't figured out a pattern)
Expected behavior As with past versions, to be asked which configuration to use for publishing app or downloading symbols.
Screenshots n/a
5. Versions:
- AL Language: 5.0.236243
- Business Central: US Business Central 16.0 (Platform 16.0.11233.11843 + Application 16.0.11240.11853)
There is a new setting (per workspace folder by default) called defaultLaunchConfigurationName which controls the default launch configuration to use in scenarios that involve server resolution (goto definition (DAL files), download symbols, F5 variations, etc,
I can see where that will helpful when consistently working with the same Docker image, but it will be a bit of a hassle when you're trying to publish to multiple environments in succession.
In any case, the setting has not affected the extension's behavior - it seems to ignore the setting. In my workspace settings:
"settings": {
"al.enableCodeAnalysis": true,
"al.codeAnalyzers": [
"${AppSourceCop}",
"${CodeCop}",
"${UICop}"
],
"al.enableCodeActions": true,
"al.packageCachePath": ".alpackages",
"al.CompilationOptions": {
"generateReportLayout": false
},
"al.backgroundCodeAnalysis": true,
"al.defaultLaunchConfigurationName": "Next Major"
},
Per this setting, I expect it to use the "Next Major" configuration. It chooses another.
There is a new setting (per workspace folder by default) called defaultLaunchConfigurationName which controls the default launch configuration to use in scenarios that involve server resolution (goto definition (DAL files), download symbols, F5 variations, etc,
Kalberes, have you actually had success with the defaultLaunchConfigurationName workspace setting in v5.0 of the AL Language extension? I have tried it with no luck.
It is a per folder setting by default. It is there.
Have you looked here?

I think it is an issue that you can not disable this feature.
When deploying against multiple environments, it is not preferable to have to delete the setting when you wish to deploy to a new environment.
Is there a way to override so the default will not be set on deployment?
We will move it to per user settings when VsCode will support and add an optout. If the optout is chosen then go-to definition will not work if multiple debug configurations are specified and symbols need to be resolved based on server knowledge.
Yes, I have found the "per folder" setting, as shown below. It has no effect on the behavior.

My apologies. The folder setting has the desired effect.
I look forward to the "optout" user setting.
The problem is not that we can't set this per folder or per workspace. The setting itself assumes everyone only deploys to one environment on any project. It actually makes the launch.json file configurations useless. I seriously don't understand why this settings exists and the fact that i can't turn it off in any way makes it worse.
Please, someone change this. I usually deploy to multiple environments and now i have to be extra careful that i don't deploy my project to production by mistake just because i did it the last time.
It seems the source problem is solved with the defaultLaunchConfigurationName settings, I close the issue now.