Is there anything like Debug.Break() but which finishes the app instead of pausing it?
Debug.Break()
You can use EditorApplication.isPlaying or eventually EditorApplication.ExecuteMenuItem(“Edit/Play”)