I'm receiving an error when running a Windows service in the background, but no errors are shown when debugging with an attached debugger.
- Although I added logging statements to each method and catch block to determine any errors or hits to catch block, the running service did not log any statements while running in the background.
- While debugging with the attached debugger and stepping through each line, all statements were logged and the process was successful without any errors being thrown.
I aim to identify the cause of the exception being thrown during runtime, but not while debugging. The service runs every 60 seconds to check if any data is queued for processing in the database, and if so, it executes.
I require information on the possible causes of the error being thrown, and it would also be helpful if someone could provide guidance on logging using NLog, as no statements were logged when the service was running in the background.
Thanks in Advance!!