how to quit the application in the editor of u3d?

if a script has a endless loop,when i use play mode,the unity may get dead,how can i stop the script?

and when i debug the program,how can i quit the application in the source code.i try to use Application.Quit().but the manual says that:
Quits the player application.
Quit is ignored in the editor or the web player.

so are there some else methods to quit?

I don’t think you want to quit the editor, just to stop play mode.

#if UNITY_EDITOR
     UnityEditor.EditorApplication.isPlaying = false;
#else
     Application.Quit();
#endif