【发布时间】:2020-08-08 04:09:06
【问题描述】:
一般来说,当我想调试时,我只需要设置断点,在 VSCode 中运行调试,然后在 Unity3D 中进入播放模式,如果它捕获任何断点,Unity3D 将暂停并导航到 VSCode 中的断点。但是最近,我做不到了。
unity ver 2019 和 2020 都会出现这个问题,我认为问题不在于我的编辑器,而在于我的 VSCode 和一些配置,但不知道如何解决。当我在 VSCode 中运行调试时,它仍然在调试控制台中附加了 Unity3D,在 google 上搜索了一些提示但没有解决问题。即使我创建了一个新项目,但它仍然无法正常工作。非常感谢您提供的任何提示。
这是我的 launch.json 文件
{
// 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"
}
]
}
【问题讨论】:
标签: c# unity3d debugging visual-studio-code vscode-debugger