Search Unity

While debugging in Visual Studio, Unity editor terminates

Discussion in 'Code Editors & IDEs' started by GuerricHache, Sep 28, 2020.

  1. GuerricHache

    GuerricHache

    Joined:
    Dec 21, 2013
    Posts:
    9
    There's a portion of my C# code I'm trying to debug. I set a breakpoint just before it and start stepping through the code, and when I reach a certain portion of the code (a foreach loop on a dictionary), the Unity editor suddenly completely terminates without any kind of prompt, and Visual Studio stops debugging.

    Once, when I did this, I got a message from Visual Studio saying "Unable to step. General exception." but otherwise it's all been completely silent.

    I saw somewhere a suggestion to run Visual Studio in administrator mode, but after doing that Unity was no longer able to interact with Visual Studio (open files through VS, etc), so that's a non-starter. I've been unable to find any other resources suggesting what this might be. I don't think I'm doing anything that isn't very basic C# coding here.

    What might be going on, and how do I figure it out?