Unity Advanced Tips-use MonoDevelop to debug breakpoints

Source: Internet
Author: User

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:

    1. Open Unity's Preferences interface, such as.
    2. Select the External Tools page of the configuration interface.
    3. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.