The Finish and Destroy commands differ in the case of persistent sessions. The Finish command changes the state of a session to "not running" or "hidden," depending on the value of the Action on Finish property for the session. The Destroy command removes the session. The debugged VM is exited and the session disappears from the Sessions tab. If a session is not persistent, the Finish and Destroy commands both remove the session.
To finish or destroy a session:
If you are finishing a persistent session, and its Action on Finish property is set to Finish Session, the debugged VM exits (if it was launched by the debugger) or disconnects (if it was attached). The session state becomes "not running." When you start the debugger again, the process is launched or attached by the debugger
If the Action on Finish property is set to Hide Session and Listen, the debugged VM does not exit or disconnect, but remains running. The session state becomes "hidden." No information related to this process (for example, running threads) is displayed and debug commands (such as Pause) are disabled. Breakpoints remain set in the debugged VM and if one is hit, the session's state changes to "stopped on breakpoint" and the debugger starts. If you start the debugger with the Start Debugger command, the session state changes to "running."
Hiding a session is useful if you have started a complex application by the debugger (for example, a server) and you want to stop debugging, but not execution of the application (so that you can modify the client sources and debug the application later).
See also | |
---|---|
Restarting a Persistent Session |