Visual Studio Detaches When Placing Breakpoint

I’ve had this bug for a while so I’m sharing my workaround in case anybody else experiences it.

Symptom
When debugging, placing a breakpoint detaches visual studio from Unity.

When does it happen?
A few times a week, in an inconsistent fashion. As far as I know, this only happens when debugging the Unity Editor and when placing a breakpoint inside a bursted method (e.g. inside Entities.ForEach or an IJob).

My config
Unity 2022.3.13f
Visual Studio 17.6.3
Burst 1.8.9
Entities 1.0.16

My workaround

  1. Close Unity
  2. Delete the burst cache (ProjectName\Library\BurstCache)
  3. If the issue persists, go back to step 1, but turn of Burst compilation (Jobs > Enable Compilation)
1 Like

Hi @msfredb7 , thanks for the report. Have you noticed if there are a particular sequence of steps that lead to that happening? We haven’t seen this before, but if you’re able to provide a repro project (via Help > Report a bug), and (ideally) repro steps, we’ll investigate.

I haven’t found any repro unfortunately. If I do I will make a report. My colleague experiences the bug as well so I know it can be reproduced … somehow :).

1 Like