Debugging Business Central 17.4 onprem

Hi experts,

We have a question regarding debugging. As I can not find a proper answer to my question I am asking it here, hoping to get an answer.

We are working with Business Central version 17.4 onprem.

We are wondering what the best way of debugging is when we want to debug our customers production database?

We know we can attach a debug (or snapshot) configuration to the Launch.json but this will only trigger the debugger when an error occurs (or with the snapshots it will only record the snapshot when an error occurs).

On the Customers server we do have Visual Studio Code installed.

We deploy our solution (app) via powershell scripts and we have the property ShowMyCode set to False as we do not want other parties being able to download our source code.

So on the Customers server we don’t have the possibility to set breakpoints in code to trigger the debugger when executing the process we would like to debug.

So we were wondering what the best way is to debug a process in the Customers database that does not throw an error.

Thanks for the advice.