We have the option to monitor long running SQL queries in vscode.
We go to launch.json and set enableLongRunningSqlStatements to true and longRunningSqlStatementsThreshold to a desired value.
The problem is, we can casually turn it on and see if a query was added on the side but we don't have call-stack or variable information, it's also really easy to miss entries, since they'll silently be added to the sidebar.
Just like we can break on record write (temporary or non-temporary), or break on error (try-function or normal), we should be able to hit a breakpoint when we enter these hard-to-find performance spikes.
Catching these in telemetry is good, but a bit too late and much harder to dig into than when it's occurring in the debugger in development.
Business Central Team (administrator)
Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team