Open Visual Studio Code from web client to investigate or troubleshoot extensions
Important
This content is archived and is not being updated. For the latest documentation, go to What's new or changed in Business Central. For the latest release plans, go to Dynamics 365, Power Platform, and Cloud for Industry release plans.
Enabled for | Public preview | General availability |
---|---|---|
Admins, makers, marketers, or analysts, automatically | Sep 10, 2023 | Oct 2, 2023 |
Business value
Recreating a locally installed Visual Studio Code workspace to investigate or troubleshoot a customer environment includes manually creating workspaces, projects, and launch configurations, and downloading symbols, all of which require knowledge as well as time to go through it.
To simplify and speed up this process, a new option to open a local Visual Studio Code instance for the current extension and environment will be added to the web client, allowing just a single click to set up a matching Visual Studio Code project for investigation or troubleshooting.
Feature details
As a developer or consultant, you can open a new Visual Studio Code session from within the web client for a specific customer production or sandbox environment. Two different contexts will be supported:
- Open a page from within the Page Inspector.
- Troubleshoot the current session from within the Help and Support page.
Here's an example of provisioning Visual Studio Code from the Page Inspector on a specific field:
Provisioning Visual Studio Code and attaching to the current session from the Troubleshooting section of the Help & Support page:
Depending on the context, Visual Studio Code will open to allow inspecting objects and source, and allow attaching to debug or snapshot debug and profile the current web client session. Regardless, access to the source code will be gated by the resource exposure profile settings for each extension:
- If Visual Studio Code is already open, the last active session will be used; otherwise, a new Visual Studio Code will open. If the AL Language extension isn't installed, the user will be asked to install it, and the process ends.
- A new project will be created or updated, and a matching launch configuration will be created, depending on production or sandbox environment.
- If invoked for page in the Page Inspector, symbols for that page will be downloaded
- If the user chooses to debug, Visual Studio Code will attach to the web client process, which it was invoked from and await breaking on error.
When using this feature and choosing to generate new projects, you should delete the projects once in a while to not accumulate many unused projects. Another option is to use the feature to specify a new default project location, but you might also want to use that for real projects.
Tell us what you think
Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.
See also
Troubleshoot in Visual Studio Code directly from the web client (docs)