Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Debugging mode forces "stop player" now?

Discussion in '2020.1 Beta' started by MrLucid72, Mar 28, 2020.

  1. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    996
    [2020.1.0b2] I thought the new "debug mode" is for editor scripts only? When I play in Unity, then attach VS, the option comes up to enable debug mode:

    Since editor only (right?), I click no. Then ... VS disconnects! I used to be able to attach VS at any time.

    If I click yes, then ... my player stops! I used to be able to attach at anytime without affecting the player.

    This feels like a massive downgrade, if this is as-intended: These are bugs, right?
     
  2. lukaszunity

    lukaszunity

    Administrator

    Joined:
    Jun 11, 2014
    Posts:
    461
    The feature is not only for editor scripts. But for debugging any C# in the editor, both editor and player scripts.

    What exactly happens when "my player stops" ?

    You can use the new bug icon in the bottom right of the editor to switch to debug mode instead of getting the dialog. For more details see "Debugging in the Editor" on this page: https://docs.unity3d.com/2020.1/Documentation/Manual/ManagedCodeDebugging.html
     
  3. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    996
    > What exactly happens when "my player stops" ?

    Asset refresh/recompile. The usual when you click stop after playing. I understand what it does, but that I used to be able to attach VS while playing. Now I cannot (forces editor to stop playing).

    Hmm, not sure if we're on the same page here :p the main point is that a playing editor stops when you attach VS debugger now.
     
    laurentlavigne likes this.
  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    If Debug Mode is enabled before you enter Play Mode, you should be able to attach the debugger without leaving Play Mode.
     
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    What made you think that?