96
Business Central needs better logging tools to help Support and Development Teams to troubleshoot errors and performance issues that customers may experience when they use ISV extensions.

Dynamics GP has two different logging tools that are very useful:
1) Script log - Logs every script (i.e. procedure/function) that runs when the user performs actions in the user interface, including parameter values passed to the script, the order in which each script is called and the call stack (i.e. script caller / callee relationships). This is useful for troubleshooting errors and business logic issues.
2) Script profile - Shows how many times each script was called and the total processing time for all calls to that script. This is useful for troubleshooting performance issues.

As far as I can tell, the main logging tool in Business Central is the Event Recorder which records what I will call "event logs". I guess it's *somewhat* similar to Dynamic GP's script log in that it shows events that occurred and the order they occurred in. But I don't think it shows sub-procedures called by your event handlers and I don't think it shows the caller/callee relationships (indicated by indents in Dynamics GP's script log).

Also, saving *all* of the recorded events to a file is very cumbersome. To save *all* events, you must first scroll through all of them in the Event Recorder window to ensure that Business Central has loaded *all* of them. Next, you have to hit Ctrl-A and then Ctrl-C. Next you have to open an Excel file and use Ctrl-V to paste the events. It would be great if there was just one button to save all of the recorded events to a file!

As far as troubleshooting performance issues goes, it seems that Business Central does not have a log similar to Dynamics GP's script profile. Please add a logging tool similar to that.

Regards.
Category: Development
STATUS DETAILS
Under Review
Ideas Administrator

Thank you for your feedback. Please continue voting on this idea. 

Note that 2020 Wave 2 has two related tools (but not addressing idea ask directly):
  • Snapshots for capturing execution in production and replay in debugger offline (in preview at launch, only enabled in sandboxes)
  • Performance toolkit for measuring app performance as part of developing
Also note that debugging in sandbox (as a copy of prod) allows investigating amount of SQL calls and execution time. There are also a number of recent telemetry options for the same (with possibility to set out automatic monitors/notification in AppInsights). See aka.ms/bctelemetry


Best regards,
Business Central Team