- Home /
Unity debug works randomly
Hello,
Since something like a year now I have a recurring problem with debugging Unity : it works very randomly, sometimes it works flawlessly, and sometimes I have to reboot my computer a random number of times before it correctly attaches to the unity process.
I spent hours searching and trying different things on the web, but I never managed to identify the problem.
I tried these:
Check if the firewall blocks any unity process
Try VS Code, VS 2017, and VS 2019 debuggers, when one of them is unable to attach, it's the same for the others.
Start VS in administrator privileges
Restart Unity
Switch unity debug to release and back to debug
Use another computer (same behaviour on my laptop)
Check if the PID the debugger attaches to is correct
Nothing except rebooting and praying worked.
It's easy to identify when the debugger won't work, when it starts nothing appears in the call stack section where it is supposed to have multiple threads:
And the debug console only displays these three lines:
After a few seconds the debugger disconnects without any further explanation.
Since my project grows every days, it is becoming really painful to debug without this tool, I wish I could find a workaround.
Thank you for your help.
Your answer
![](https://koobas.hobune.stream/wayback/20220613033937im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Disable crash reporter 2 Answers
debugger halt after start(), can only resume in update 0 Answers
Android and FrameDebugger 0 Answers
My debug button in monodevelope is off!!! 1 Answer
Unity freezes if debugger is attached before clicking play 0 Answers