JDK-7022037 : Pause when exiting if a debugger is attached on windows
Type:Enhancement
Component:hotspot
Sub-Component:runtime
Affected Version:hs20
Priority:P4
Status:Closed
Resolution:Fixed
OS:windows
CPU:generic
Submitted:2011-02-24
Updated:2011-04-25
Resolved:2011-04-25
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
When running in Visual Studio the console window is closed as soon as the debugged process ends. This makes it impossible to see the output from the process after it as ended.
SUGGESTED FIX
At the end of normal execution we can check if a debugger is present and wait for a keypress before exiting. At then end of a failed execution (assert/crash) we can execute the breakpoint instruction to catch the error in the debugger.