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.