Debugger Not Working [SOLVED]

Sharing this in case anyone else has issue with Debugger during the Inventory course Debugger section.

Unity 2020. 2.4f1
Visual Studio Community 2019 V.16.8.2
Windows 10

Debugger would not auto stop like shown in the course after adding the Debug break points on the left side (or with f9 when cursor is on line).

Description: Unity is unable to update certain files to allow crosstalk between programs. Run as administrator to fix.

  • Close Unity and VS
  • Add shortcut to Unity to desktop
  • Right click Unity shortcut > Properties > Advanced > Run as Administrater > Close Popup > Apply
  • Reopen Unity and VS script for debuggin
  • In VS at top click “Attach to Unity”
    NOTE: May need to click popup option appearing in Unity
  • In Unity at top click “Play” button

Description: VS has a possible corrupted or bugged solution. Rebuild it to fix.

  • In VS click “Build” > “Rebuild Solution”.



Thanks for the very well explained tip!

I’ve previously had problems with Unity / VS debugger not connecting - though not for a couple of years now.

Typically my fix was (in order of pain descending):

  1. Do a VS update: Help → Check for Updates (warning, big download ahead)
  2. Run the Visual Studio Installer and remove / add the ‘Game Development with Unity’ workload.
  3. Worst case I’d download a new version of Unity via the Unity Hub.

Obviously try closing and reopening Visual Studio / rebooting your PC before trying the above.

Privacy & Terms