Snapshots – troubleshooting in production environments
Important
This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.
Enabled for | Public preview | General availability |
---|---|---|
Admins, makers, marketers, or analysts, automatically | Oct 1, 2020 | Jan 11, 2021 |
Business value
A common support scenario for resellers/VARs is to be contacted by the customer with an issue in their solution that needs troubleshooting to determine the cause as well as the location of the issue in the code.
While there is support for creating sandboxes with a copy of production data, and debug/stop program flow on that without impacting customers' production tenant, in some cases the customer is blocked and the partner is under heavy time pressure to investigate and resolve the issue without the time required to provision a duplicate environment and reproduce the issue there.
To address this, we are introducing the ability to attach the Visual Studio Code AL debugger to a production tenant to take snapshots of code execution, allowing rapid investigation and collaboration with the customer on exact reproduction steps.
Feature details
With the new snapshot feature, you can:
- Set snappoints in code.
- Create a new snapshot attach configuration. This could be web client, web API, or background session (by specifying user ID or session ID, no selection UI yet).
- Attach to an environment in snapshot mode.
- Perform reproduction steps to trigger snappoints.
- Download snappoint in Visual Studio Code after completing reproduction.
- Inspect stack trace/program execution as well as variables at snappoints offline in Visual Studio Code.
Note that:
- Access requires a new permission and in the case of a user session, the user will be warned about snapshot capture taking place.
- Snapshots are discrete points in time and thus, typically, several roundtrips of taking snapshots could be required (as snapshots are not taken interactively as in normal debugging, but require a new user flow recording when new snappoints are added).
- Sandbox environments will still be required to set actual breakpoints (stopping program execution in the session) and stepping through code.
Important
Upon the Business Central 2020 release wave 2 launch, the above snapshot feature will only be available as a preview and in sandbox environments. Here the value will be less than the normal debugger, except for providing the ability to attach to a specific session. Once through testing, it is expected to be enabled for production environments in one of the first minor updates.
Snapshots in production environments have now been enabled from v17.2 and forward.
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.
Thank you for your idea
Thank you for submitting this idea. We listened to your idea, along with comments and votes, to help us decide what to add to our product roadmap.
See also
Snapshot Debugging (docs)