Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Debugging in Visual Studio Code is a nightmare

Discussion in 'Code Editors & IDEs' started by SleepyAgapornis, Sep 10, 2020.

  1. SleepyAgapornis


    Sep 7, 2018
    Since some months ago I've started to have a lot of issues when debugging with visual studio code.. 1-2 years ago vscode was a delight to use alongside unity.. but now it's becoming worse and worse with each update... I was hoping an update would solve all these problems, but nothing happens so I started to wonder if I'm doing something wrong... Every time I hit debug I have to cross my fingers and pray to god for the debugger to work properly.. it works maybe 4 of 10 times and there is a 3/10 chance that it causes the unity editor to completely freeze. I've tried updating the debugger extension to beta 3.0.2, but nothing changes.. I've also tried downgrading visual studio code and even reinstalling the whole package.. but nothing.

    Currently, I'm using:

    Visual Studio Code 1.48.2
    Debugger for Unity 2.7.5
    C# Extension 1.23.2
    Unity 2019.4.0
    Visual Studio Code Editor 1.2.1

    Does someone have an idea of what might cause visual studio code to debug so badly?

    UPDATE: I've read in another thread that some people were able to make this tool work fine by downgrading to 1.42.1... I've uninstalled my current version and installed that one.. and I have the same problems.. the editor freezing, the debugger stopping or not hitting breakpoints. etc
    Last edited: Sep 10, 2020
  2. AmazingRuss


    May 25, 2008
    Rider has been pretty stable with the debugger for a long time. It's worth the money.
  3. Entretoize


    Feb 27, 2015
    Any news about that issue ? I cross my fingers too, each time !
  4. Jonathan-Tremblay


    Oct 15, 2013
    The Debugger for Unity extension has been deprecated. Luckily, there's a new way to debug with VSCode. You need the Unity extension in VSCode (which also installs the C# and C# Dev Kit extensions). Additionally, you need to use the Visual Studio Editor package (2.2.22) in Unity (not the Visual Studio Code Editor package). With this setup, debugging works very well! :)
    sailro likes this.