Search Unity

Feature Request VS Code debugger no longer maintained

Discussion in 'Editor & General Support' started by jmgek, Oct 7, 2022.

  1. jmgek

    jmgek

    Joined:
    Dec 9, 2012
    Posts:
    177
    Last edited: Oct 7, 2022
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,924

    I don't understand your request... debugging in Visual Studio has always worked fine? o_O
     
  3. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    602
    @arkano22 Visual Studio and Visual Studio Code are two completely different things.
     
  4. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,924
    Been using Visual Studio in Mac for quite a while, debugging hasn't been an issue. Although I'm unsure if the situation is different in Windows.
     
  5. jmgek

    jmgek

    Joined:
    Dec 9, 2012
    Posts:
    177
    Code debugging has officially been deprecated as it is no longer being maintained.

    @arkano22 if you're going to respond it may help to know the tools people are referring to as vs studio is not vs code.
     
    arkano22 likes this.
  6. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,924
    Been confusing “code debugging” with “Code debugging” as in VS Code debugging. Silly mistake, sorry.
     
  7. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    602
    By the way "Visual Studio for Mac" is third IDE completely different from "VS code" and "VS" on windows. It used to be based on MonoDevelop but looking at latest screenshots I have no idea whether it still is and they heavily overhauled the UI or rewrote whole thing from scratch, meaning that there could potentially be 4 completely different IDEs called "VS something". Marketing people just want to confuse their users. The fact that VS (proper) has history of attaching words to VS name for classify license tiers Professional/Enterprise/Community/Express doesn't make things less confusing.

    Back to topic:
    I agree that Unity not properly supporting VSCode debugging is pretty bad (and I use and debug with VS Code for work) .

    If you look at from more pragmatic perspective of just getting your work done and debuging your code, without any hopes of competent work from Unity here are the options that I am aware of:
    * If you are on student/hobyist/solo dev on windows or anyone else matching the revenue limits of Visual Studio Community edition. It is bulkier than VS code but if alternatives means no debugging I know what I would choose (if I were on Windows)
    * while the VS code unity debugger plugin hasn't been maintained for more than twos years and is half broken. It can be made to partially work which is still better than no debugging (that's how I have been working for last year or two) Write a comment if you are interested in more details.
    * there is a third-party fork for the VS code unity debugger extension which is also not maintained, but only for 1 year instead of 2. So it might be slightly less broken. Haven't used it myself, as with any software made by random person on internet use at your own risk.
    * If you want something that is more robust but can't use Visual Studio[proper] (maybe you are not on windows) there is Rider from Jetbrains. A lot of people are quite happy with Jetbrain IDEs Rider included, and they prefer it over VS even when they have VS professional available. It's not free but not exactly crazy expensive, especially if you have to use paid versions of Unity and or Visual Studio. This is probably my next choice once the Unity VSCode debugger extension completely bitrots and becomes unusable.
    * One more option is to use generic mono debugger extension for VS Code. https://marketplace.visualstudio.com/items?itemName=ms-vscode.mono-debug I have managed to successfully configure and debug unity using that. The connection and launch process is somewhat manual and more tedious than what you would want for everyday use. It probably doesn't work for every possible Unity target platform/build configuration. But again it's better than nothing in situations you really need it.
    * As for smooth hassle free debugging experience in VSCode your best bet is probably waiting for when Unity switches from Mono to the latest open source .NET runtime (whatever it's called). It should probably improve the tooling compatibility to the point where generic stuff provided by Microsoft either works out of box, or the effort is low enough that Microsoft or Unity is willing to make the necessary glue code. From what I understand Unity is internally working on this, but since there are currently not even experimental public versions of this from Unity it will probably take a few more years until this becomes usable.


    So overall if you are "anyone who's actually doing work and generating money" you have a few good options. And if you are someone who isn't generating money, the options might be less convenient but there are some.
     
    jmgek likes this.
  8. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    475
    Sometimes I use Code and then Visual Studio when I need to debug. Not ideal but not a huge deal.
     
  9. jmgek

    jmgek

    Joined:
    Dec 9, 2012
    Posts:
    177
    To anyone who's using VS code and need to attach to process, the new debugger now works:

    ALT-P then "Attach unity debugger to your process."