Unity2021配置VSCode调试
2023/03
22
19:03
安装插件并调试
一、VSCode安装unity3d-pack插件
unity3d-pack已包括 Debugger for Unity; Unity Tools; C# 等工具
二、在Unity工程目录下,增加.vscode/launch.json文件
D:/Project/Assets/…
D:/Project/.vscode/launch.json 的内容为:
{
"version": "0.2.0",
"configurations": [
{
"name": "Unity Editor",
"type": "unity",
"path": "./Library/EditorInstance.json",
"request": "launch"
},
]
}
三、在Unity状态栏右下角,点击小虫按钮,点“Switch to debug mode”
如果不点,直接连上去调试则会显示
四、打断点,调试
貌似.NET Core Tools这个插件是不用安装
如果有多个Unity,则会发生异常:
方案一:去任务管理器找到多余的UnityEditor,杀掉
方案二:手工选择并进行调试
选择一个进行调试即可
需要安装的SDK
.Net Framework 4.7.1
CopyRights: The Post by BY-NC-SA For Authorization,Original If Not Noted,Reprint Please Indicate From 老刘@开发笔记
Post Link: Unity2021配置VSCode调试
Post Link: Unity2021配置VSCode调试