I have a console application that will crash as soon as it is started, but display some very useful information (for my debugging) before it terminates.
I used to launch this application on Windows 8.1, where a message box with the error message "... has stopped working" would appear. The console window would remain open for me to read the console output until I clicked "Close the program" in the error message box.
I am now migrating to Windows 10. Unfortunately, Windows 10 does not display the "... has stopped working" message box. Instead, it closes the console automatically as soon as the application has crashed.
I am seeing the same phenomenon on my contacts' Windows 10 machines, although I am also being told about one Windows 10 machine where the error message box still gets shown.
Is there any way to force Windows 10 to show the message box (globally, or just for that one application) again?
I have tried various workarounds, but they all come with drawbacks:
- If I launch the console application from a console window (
cmd), it will still open an additional console window, thus my console window remains blank. (Maybe this is linked to the application in question requiring elevated permissions and asking for these upon launch?)
- Doing the same and piping the output to a file just produces a blank file.
- I can modify the source code of the console application in question to wait for some input in the end, but it's a change that I must do only in my local working copy, and it means I have to rebuild said application on a daily basis (as my local binary will otherwise be overwritten by the latest version from a build server).
- I can find the same output in the Windows event log, but that's quite a tedious alternative, given that the event log viewer is a pretty slow application and it tends to bury the relevant data among thousands of other uninteresting log entries.