When you connect with the GUI, you select "Keep the VM alive for profiling" in the session startup dialog: