Debugger "paused on exception", but no call stack or cause shown anywhere
1. Describe the bug In my case, after a onValidate trigger is finished, and before entering OnAftergeRecord on a Page, the debugger is stopping on an exception. It shows "paused on exception", but the call stack is empty, and there is nothing in the VARIABLES/Locals section. Without single stepping, this exception is still breaking the code execution and I have to continue manually (f5) - very annoying and not helpful in any way.
2. To Reproduce Sorry, without any exception info, I cannot tell. I added a commit to see if this would cause the exception earlier, but no success.
3. Expected behavior Either don't stop execution, or give any info on why the execution is stopped (other than there was an unnamed exception) - or give a way to skip/ignore "non critical and non informative" exception!
4. Actual behavior Debugging is very time consuming when code execution is stopped, and only the little "paused on exception" info near the call stack even indicates execution is stopped.
5. Versions:
using latest vs code and AL extension / runtime 15.0 (used older runtime before, and had the same issue for month) / tried 25.x & 26.0
Hello, without more information, it is hard to narrow down what is causing it.
Are you experiencing this issue when debugging a local server or docker, or when using a sandbox for Business Central online? If the latter, we would recommend to raise this as a support case and share your environment and session information from the help pane so that we can look into telemetry if needed.
As a workaround, have you looked at the configuration setting "breakOnError" and setting it to "None"?
Hello! I use online sandbox. Yes, "breakOnError": "None" is helping. Although it's disabling a bit much. And this indicates that this exception seems to be classified as an error. I will try to open a support case (never done that for coding purposes, but I guess I will see...) Thank you
P.S.: Unable to raise a support case without a support plan.
Do you have any third-party apps that maybe have allowDebugging set to false? Do you notice another tab/file being opened while the debugger breaks?
The break is always at the same moment: after leaving onValidate trigger, and before onAfterGetRecord (when single stepping). There is nothing noticable, except for the "paused on exception" state - which is the reason for this ticket in the first place. I wondered if there is a more detailed log hidden somewhere, that might shed light on the cause of the exception. All changes are saved.