The launch startupcompany does not work when debugging
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
Description
1. Describe the bug
I would like to debug in a specific company using the new startupcompany setting. It does not work...
References:
- https://www.yammer.com/dynamicsnavdev/#/Threads/show?threadId=1963454374150144
- https://learn.microsoft.com/en-us/dynamics365-release-plan/2022wave2/smb/dynamics365-business-central/launch-specific-company-visual-studio-code

2. To Reproduce
Steps to reproduce the behavior:
VS Code part
- I always work with workspaces. These workspaces might contain different project folders
- Each project folder contains a /.vscode/launch.json file which is empty (
{}) - Instead of managing my configurations on project or workspace level, all configurations are part of my personal settings.json
- This has worked for years, without the latest addition to manage launch.json data on other levels
- With the latest addition of the startupcompany parameter (see https://learn.microsoft.com/en-us/dynamics365-release-plan/2022wave2/smb/dynamics365-business-central/launch-specific-company-visual-studio-code), I've included the startupcompany in my configurations
BC Part
- My current user is linked to company 1 (my settings)
VS Code
- Whenever I publish with/without debugging and select a configuration with a startupcompany different then company 1 (the default of the user in BC), it seems to be totally ignored.
- The web client opens after the publish/debug step and uses the company as specified in the BC user settings, instead of the startupcompany specified in the launch configurations.
3. Expected behavior
startupcompanyshould be supported in all 'publish with/without debugging' commands.
4. Actual behavior
5. Versions:
- AL Language: v10.1.707468
- Visual Studio Code: 1.73.1
- Business Central: US Business Central 21.1 (Platform 21.0.48357.49378 + Application 21.1.48363.48789)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with an empty .vscode/launch.json and configurations in VS Code settings.json, selecting a startupcompany different from the Business Central user's default. Start by tracing the publish with and without debugging commands; done means each command opens the web client using the startupcompany from the selected launch configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100