Exclude Try functions when debugging errors
This content is archived and is not being updated. For the latest documentation, go to What's new and planned for Dynamics 365 Business Central. For the latest release plans, go to Dynamics 365 and Microsoft Power Platform release plans.
|Enabled for||Public preview||General availability|
|Admins, makers, marketers, or analysts, automatically||Sep 1, 2022||Oct 1, 2022|
When debugging, it has been possible to control whether to break on errors. However, until now, failing Try functions would also lead to breaking execution. These Try functions are usually used to handle errors and might not be of interest. To allow ignoring these to more efficiently debug errors, a new option has been added to omit errors in Try functions.
We have added new options to control when the debugger should break on errors in Try functions. Instead of the old Boolean BreakOnError setting in a launch.json file connection setup, this now takes one of the following values: true, false, None, All, ExcludeTry
The behavior for each option is:
- false/None: Does not break on any errors.
- true/All: Breaks on all errors.
- ExcludeTry: Breaks on errors only if they occur outside of the context of a Try function.
The values true and false are retained for now for backward compatibility. They map to All and None. We recommend using the latter going forward. True and false might become obsolete in a future version.
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.
JSON Files (docs)