Objective
Breakpoint debugging is a very important feature in programming debugging, and Unity's own script Editor MonoDevelop needs some setup to use breakpoints debugging, and today we'll look at how to debug breakpoints using MonoDevelop.
"Version Environment"
Unity version: 5.2.2
What are you going to learn?
- How to set the default script editor for unity
- How to connect monodevelop and unity processes for debugging
First, set the default script editor for unity
If you don't have a friend who has specifically modified the Unity Script Editor, you can skip this section
Figure One: Open the Preferences window
Figure II: Modifying the default Script Editor
The setup steps are as follows:
- Open Unity's Preferences interface, such as.
- Select the External Tools page of the configuration interface.
- Change the External Script Editor setting to internal, such as two.
Second, connect unity and MonoDevelop for breakpoint debugging
Open the Attach interface
First we open the MonoDevelop Script Editor, select run->attach to process..., open the Connection dialog box, select your Unity project process in the Connection dialog box, such as:
Connect to your Unity project process
After the connection is successful, the upper-left view of the MonoDevelop editor changes, such as:
View changes after a connection
Here are some of the action buttons for breakpoint debugging. To turn off the MonoDevelop connection to the unity process is also simple, click the last plug icon in the red box to disconnect the button.
Once the connection is successful, go back to the Unity scene editor and start running your game, and if you have a breakpoint in the code, then when the program logic runs to the point where the code breaks, it will stop at the breakpoint, and we can trace some of the data information for the current breakpoint to debug.
Code Break point Illustration
Zui
Links: http://www.jianshu.com/p/8f80e678e08b
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
Unity Advanced Tips-use MonoDevelop to debug breakpoints