How to use Vscode to debug Unity C # code

Source: Internet
Author: User
Tags pack

1. Start Visual Studio Code and click the "Extend" button on the left column.


2, enter "Unity3d-pack" in the search field, install. Unity3d-pack is a collection of unity Plug-ins on the code side of visual Studio, including many of the C # code AIDS, debuggers, shader tools, etc. needed for the unity development. Here is the debugger for Unity.


3, open the project directory with Vscode, shift+command+d open the debug bar, the above select Unity Editor, click Start Debugging (F5), shift+command+y Open Debug console, show "attached to Unity Process ' Unity Editor (Unity) ' 380 ' (if you choose to debug on Unity Editor), that is, start debugging success.

Note: If you encounter Unity Vscode spawn Mono enoent, because there is no installation mono, can not be debugged,

Brew Install Mono

or to http://www.mono-project.com/download/download installation mono


4, switch to unity, the start of the game can be debugged.

Use the Unity Editor menu, edit (Edit) –> Preferences (options) to open the editor option.

Click on the Vscode tab on the left to make Vscode related settings, and you may need to click Write Workspace setttings for the first time.

Related Article

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.