Generally, when I want to debug, I just need to set breakpoint, run debug in VSCode and then get in Play Mode in Unity3D, if it captures any break point, the Unity3D will pause and navigate to the breakpoints in VSCode. But recently, I can't do it anymore.
This problem occurs in both unity ver 2019 and 2020, I think the problem is not about my editor but my VSCode and some configuraton, but don't know how to solve it. When I run the debug in VSCode, it still attached Unity3D in the debug console, have searched some tips on google but not address the problem. Even if I create a new project but it's still not work. Thanks so much for any tips.
This is my launch.json file
{
// 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"
}
]
}