This shows the values of local variables in the function that is currently executing. Perhaps the most important of these is the Locals tab. Information about the state of execution is shown in the tabs at the bottom of the MonoDevelop window when execution is paused at a breakpoint. The arrow shows execution paused at the breakpoint When the script is “frozen” like this, you can use the debugger to determine exactly what the script is doing.
#MONODEVELOP 7 WINDOWS CODE#
Breakpoint being added to code on line 16Īdding a breakpoint to a line instructs Unity to pause execution of the script just before it reaches that line during Play mode. Clicking in this bar will add a so-called breakpoint marker next to the line of code. However, there is also a grey breakpoint bar to the left of the editor panel. The currently open source files are shown as tabs in MonoDevelop and can be edited there with the features of a standard text editor. With these steps completed, you are ready to being debugging your Unity scripts by clicking the play button.
#MONODEVELOP 7 WINDOWS FULL#
You can also select “Attach To Process”, this will show the full list of debuggable Unity processes. Just before starting a debugging session, select the target you wish to debug from the target list next to the play button (Unity Editor, OSX Player, etc.). Also, make sure that the Development Build and Script Debugging options are enabled in the Build Settings for your target platform (menu: File > Build Settings). Then, you should synchronize the Unity project with the MonoDevelop project (menu: Assets > Open C# Project). To enable MonoDevelop’s source level debugging (see below for details) you should firstly check that the Editor Attaching option is enabled in the Preferences on the External Tools panel. With this option enabled, Unity will launch MonoDevelop and use it as the default editor for all script files. You should check that MonoDevelop is set as the external script editor in the Preferences (menu: Unity > Preferences and then select the External Tools panel). MonoDevelop is installed by default with Unity, although there is the option to exclude it from the installation on Windows. The text editor will not be covered here since it is fairly intuitive, but the integration of the editor and debugger with Unity are described below. An IDE combines the familiar operation of a text editor with additional features for debugging and other project management tasks. MonoDevelop is the integrated development environment (IDE) supplied with Unity.