1.You can debug all the languages supported by the engine (JavaScript, C#, and Boo).你可以调试引擎所支持的所有语言(Javascript,C#和Boo)。

2.Note that the debugger has to load all your code and all symbols, so bear in mind that this can have a small impact on the performance of your game during execution.  Typically, this overhead is not large enough to affect the game framerate.注意:调试器会加载你所有的代码和所有的符号,所以牢记,这在你游戏执行的过程中会对游戏的性能有一些小的影响。通常情况下,这种开销不足以大到影响游戏的帧率。

3.调试准备步骤:(1)设置断点,单击所要分析的行的最左边。

                     (2)Launch Unity or your player.

                               Unity: Ensure you have "Editor Attaching" checked in the Preferences window.确保Preference窗口中的Editor Attaching被选中。如果不选中,将不能连接Unity editor进行调试。即(3)中的Attach不能成功。

                               Players: Ensure that you have built your player with the "Development build" and "Allow script debugging" options enabled. For  webplayers,  additionally        check that the development release channel setting is enabled on the player's context menu (right click on Windows or cmd-click on Mac OSX):确保在你在编译播放器(在Bulid Settings中)时启用了"Development Build" 和"Allow Script debugging"。在webplayer中,还要确保在播放器的上下文菜单中启用了development release setting(在Windows中右击或者在Mac OSX中cmd-click)

                            这是为了使(3)中的desktop standalone players, Android and iOS players可以成功A调试

                      (3)在工具栏中选择Attach按钮,或者选择菜单Run->Attach to Process,在弹出的对话框中,选择要调试的进程(双击进程)。

Currently supported debugging targets: Unity editors, desktop standalone players, Android and iOS players

目前支持调试的目标:Unity编辑器,桌面独立播放器,Android和iOS播放器。

If your player is set not to run in the background (the default), you may need to focus your player for a few seconds in order for it to appear in the list.

如果播放器设置为不要在后台运行(默认),你可能需要关注你的播放器几秒,以便他出现在列表中。 这句不太清楚,总之打开你要attach的播放器,放在前台运行几秒钟后总是可以使其出现在列表中的

Android和iOS播放器在script debugging被启用时需要启用网络。所有的播放器都需要和运行MonoDevelop的计算机在相同的网络子网中。

4.When you enter play mode, your script code will execute in the debugger.
当你按下播放模式,你的脚本代码将会在调试器中被执行。

When a breakpoint occurs, script execution will stop, and you   will be able to use MonoDevelop to step over, into, and out of your   script methods, inspect your variables, examine the call stack, etc.
当断点发生时,停止执行脚本,你可以使用MonoDevelop去单步调试进出你脚本中的方法,检查变量,检查堆栈等。

  • Note: When you're done debugging a toplevel method (e.g. Update()), or you just want to jump to the next breakpoint, you will experience better debugger performance by using the Continue command instead of stepping out or over the end of your function.
    注意:当你调试完一个顶层的方法(例如:Update()),或者你只想跳到下一个断点,你使用继续命令而不是跨出或超过函数会让你体会到更好的调试性能。

When you're done debugging, click the Detach or Stop buttons in the toolbar, or choose Detach or Stop from the Run menu.
当你完成调试是,在工具栏上单击"Detach"或"Stop"按钮,或者从Run菜单中选择 "Detach"或 "Stop"。

If you add a watch to the this object, you can inspect the internal values (position, scale, rotation...) of the GameObject to which the script is attached.
如果你添加对象到监视时,你可以检查该对象上脚本中内部的值(位置,缩放,旋转。。。)。