Some times run time errors occurs, either because of a bug, or because of user=specific scenario.
It is hard to debug remotely.
is there a way to catch a trigger of run time error, and create a log file with information like: code line, certain variable values, error code, etc?