C# VS代码可以';在unity3D中捕获断点
通常,当我想要调试时,我只需要设置断点,在VSCode中运行调试,然后在Unity3D中进入播放模式,如果它捕获任何断点,Unity3D将暂停并导航到VSCode中的断点。但是最近,我不能再这样做了 这个问题发生在unity ver 2019和2020中,我认为问题不在于我的编辑器,而在于我的VSCode和一些配置,但不知道如何解决它。当我在VSCode中运行调试时,它仍然在调试控制台中连接Unity3D,在google上搜索了一些提示,但没有解决问题。即使我创建了一个新项目,但它仍然不起作用。非常感谢你给我的建议 这是我的launch.json文件C# VS代码可以';在unity3D中捕获断点,c#,unity3d,debugging,visual-studio-code,vscode-debugger,C#,Unity3d,Debugging,Visual Studio Code,Vscode Debugger,通常,当我想要调试时,我只需要设置断点,在VSCode中运行调试,然后在Unity3D中进入播放模式,如果它捕获任何断点,Unity3D将暂停并导航到VSCode中的断点。但是最近,我不能再这样做了 这个问题发生在unity ver 2019和2020中,我认为问题不在于我的编辑器,而在于我的VSCode和一些配置,但不知道如何解决它。当我在VSCode中运行调试时,它仍然在调试控制台中连接Unity3D,在google上搜索了一些提示,但没有解决问题。即使我创建了一个新项目,但它仍然不起作用。
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Unity Editor",
"type": "unity",
"path": "/D:/WecoApp/WecoAppLocal/Library/EditorInstance.json",
"request": "launch"
},
{
"name": "Windows Player",
"type": "unity",
"request": "launch"
},
{
"name": "OSX Player",
"type": "unity",
"request": "launch"
},
{
"name": "Linux Player",
"type": "unity",
"request": "launch"
},
{
"name": "iOS Player",
"type": "unity",
"request": "launch"
},
{
"name": "Android Player",
"type": "unity",
"request": "launch"
},
{
"name": "Xbox One Player",
"type": "unity",
"request": "launch"
},
{
"name": "PS4 Player",
"type": "unity",
"request": "launch"
},
{
"name": "SwitchPlayer",
"type": "unity",
"request": "launch"
}
]
}确保vs代码是Unity中的默认外部脚本编辑器。转到
Edit>Preferences>External Tools
并选择vs-code。下面的外部脚本编辑器Args
框应自动更改