I have a console application that is triggered by an event in the database. This application runs in under a second and exits awaiting the next trigger. I'm having an issue on the server that I cannot replicate on my dev machine so need to remotely debug the application on the server.
How can I attach to the process to remotely debug this application when the process is so short lived?
Let the program wait for a keypress or other external event before continuing. While it's waiting, you can attach the debugger.
Alternatively, let the program wait until the debugger is attached, see How to wait until remote .NET debugger attached.