Search Unity

Official Update on the Visual Studio Code package

Discussion in 'Code Editors & IDEs' started by Frederic_Peltier, Jun 30, 2022.

Thread Status:
Not open for further replies.
  1. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    If Microsoft was as free as you say, VSCode wouldn't exist. It is a pointless tool to begin with, and I would have never chosen it as my tool of choice, unless the language happened to be C#. I have 10 different editors I use and would have chosen over VSCode, if the language was anything else than a Microsoft language. But you see, I am out of options unless I want to pay the Rider license on top of other licenses I pay.

    Debating Microsoft here is quite pointless, but I recommend you google "vendor lock-in", read what it means, and also read how it relates to open standards. Microsoft is the prime example in these market-manipulating schemes, but also Apple is quite notorious for its trickery to force users to stick to their products.
     
  2. lcompton

    lcompton

    Joined:
    Mar 31, 2018
    Posts:
    102
    I just upgraded to Unity 2023.1.2 today only to discover that the VS Code package isn't available anymore. I was blissfully ignorant that this was going on.

    I don't have the bandwidth to research this or to switch IDEs. Is there a way to install the old package from Git or otherwise? I want to get off the ground quickly and then spend some time carefully weighing options going forward.

    I did try the forked version of the package listed above (Chizaruu's). The package installed correctly and VS Code launched properly, but there were tons of compilation errors in VS Code. Once again, I'd rather not spend time trying to sort out using the forked package, even though it may be the best solution.

    Thanks.
     
  3. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,066
    I think it should still work if you install the package by name (com.unity.ide.vscode).
     
    lcompton likes this.
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,175
    Yes, I just installed it and can confirm it continues to work in 2023.1.2. You will have to dismiss the deprecation warning the next time you start Unity but fortunately they had enough sense to make it possible to dismiss it forever (though I noticed there isn't a preferences setting to just turn it off for all projects).
     
    lcompton likes this.
  5. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    Please mind that Chizaruu's solution restructures your project csproj files and introduces an omnisharp.json and .editorconfig files. So you need to at least delete your csprojs and regenerate those files from Unity's External Tools menu, and it's a good idea to wipe .vscode directory to see there's no config conflict or such.

    @TheSleepyKoala introducing these in the README would be helpful, I think. Also, introducing a developer README in the package source wouldn't hurt...
     
    TheSleepyKoala and lcompton like this.
  6. lcompton

    lcompton

    Joined:
    Mar 31, 2018
    Posts:
    102
    That worked! Thanks a bunch. You saved me a lot of time.
     
    KillDashNine likes this.
  7. lcompton

    lcompton

    Joined:
    Mar 31, 2018
    Posts:
    102
    Thanks. I intend to give Chizaruu's package another go sometime soon... this time after carefully reading the docs. ;-) Your suggestions are helpful.
     
    TheSleepyKoala and KillDashNine like this.
  8. TheSleepyKoala

    TheSleepyKoala

    Joined:
    Aug 24, 2018
    Posts:
    24
    2023 brings in editor compatibility, which needs to be manually switched in player settings.


    I was automatically "switching" it for 2021/2022 within the package.
    You can see that here

    You're right; I'll update the readme at some point today to go over this issue.
     
    Last edited: Jun 29, 2023
    Ryiah and KillDashNine like this.
  9. sasob8

    sasob8

    Joined:
    Jul 11, 2017
    Posts:
    25
    I've read whole thread, but still don't know who to blame - Microsoft or Unity or whoever... But in the end it doesn't even matter...

    Could Unity assign couple of developers just to develop for VScode? Because if this is the possibility, than i don't know why they won't do it.

    I would probably rather switch to different game engine, than suffer with not-my-favourite-IDE :)
     
    marcospgp likes this.
  10. TheSleepyKoala

    TheSleepyKoala

    Joined:
    Aug 24, 2018
    Posts:
    24
    That would require money and time away from more lucrative investments. ;)


    I will continue maintaining the VSCode package as long as I use Unity Engine and VSCode, and hopefully, someone from the community will take over if I stop.

    However, I'm unsure about the current state of the debugger, even after exploring its deprecated components. Frankly, fixing its issues and updating it to work with the latest version of Unity would require a significant amount of development time. Unfortunately, I can't dedicate more time to it as I need to prioritize other responsibilities. (I still need to put food on my family. :()
     
    hunabku94 likes this.
  11. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    Developers are not that cheap. A lot of very rich major corporations seriously struggle in getting developers. Or they get contractors and they can't manage them and end up losing a lot of money with low ROI.
     
  12. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    The orig debugger extension is deprecated, but yesterday I installed this
    upload_2023-7-2_13-0-12.png
    and after 5 minutes of tinkering managed to get Unity prompt me to go to debugger mode and to get my playmode stop at a debugger breakpoint. Didn't try further than that but I determined that this is working.

    For people reading this, let me list my setup here:
    Unity:
    - Unity 2021.3.17f1
    - Chizaruu's TSK VSCode Editor v1.4.2 (all Prerequisites in README need to be installed, too, follow it carefully)
    VSCode:
    - VSCode 1.79.2
    - C# v2.0.238 Pre-Release
    - C# Dev Kit v0.1.103
    - Debugger for Unity 301 v4.0.1

    There's some other extensions, at least the VSTU one is a fork from the old deprecated extension and would require to install VSTU (Visual Studio Tools for Unity). Haven't tried them.
     
    Last edited: Jul 2, 2023
    TheSleepyKoala likes this.
  13. joseph114591452

    joseph114591452

    Joined:
    Mar 14, 2020
    Posts:
    28
  14. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    While it is great that there are 3rd party solutions available, honestly, users shouldn't have to rely on 3rd party.

    Given VSCode popularity the support for it should be available out of the box. It being removed is ridiculous.
     
    TheSleepyKoala likes this.
  15. leonatns

    leonatns

    Joined:
    Jul 26, 2023
    Posts:
    1
    Flutter is working on 3D engine, and it works perfect on vscode.

    Not sure how long we can stay on unity.....
     
  16. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    I think Unity would be better off dropping C# altogether in favor of some better scripting language. I for one don't like C#. Not cos of the language itself but cos of what it entails.
     
  17. dadadies

    dadadies

    Joined:
    Jul 13, 2022
    Posts:
    28
    Why is this news not made more obvious. After updating Unity i had been trying to get VSC to work for who knows how long and had initially confused Visual Studio Editor package as VSC editor package. Its not the removal of VSC support, but the no mention of it except in this random thread...
     
  18. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    Yeah it's been unofficially deprecated for over a year. Should be tagged deprecated. upload_2023-7-26_15-26-52.png
     
  19. dadadies

    dadadies

    Joined:
    Jul 13, 2022
    Posts:
    28
    Isnt its overkill to tag it as deprecated since its not even available in Unity anymore it seems? Maybe it was tagged as deprecated previously and i just didn't notice it. Couldn't they at least just still let us have access to the VSC Editor package . It seems like they've completely removed it from existence - for some devious purpose.

    I found a mirror for it. Hope it works.

    Update - Yes it works. Gee i feel like i went through hell.
     
    Last edited: Jul 26, 2023
  20. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    At least for me it's available via Unity Registry in package manager. I'm on 2021 though, dno it it affects.
     
  21. dadadies

    dadadies

    Joined:
    Jul 13, 2022
    Posts:
    28
    I just downloaded Unity version 2023 and its completely gone. I previously had 2021 also. I Spent the whole day yesterday going WTF. But i found the package in a special mirror. I dont care about VSC itself, but all that trouble was completely unnecessary if they had just made it more obvious that it was no longer supported. I thought VSC was the official IDE/code editor so it threw me off. Otherwise I would have gone straight to looking for a mirror right away or try another ide instead of trying to 'troubleshoot' the problem.
     
    Last edited: Jul 26, 2023
  22. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    I feel like I need to explain my earlier post.

    After a bad day, I loaded up a project I haven't touched for quite some time in hopes to tinker. Fired up Visual Code, and, here we go. Once again, Intellisense Doesn't work, VSCode doesn't provide hover tips for classes and so on. So I start checking out, how things are going with VS Code, find this thread, see that there's third party workarounds... mayeb even debugger will start working because last time i couldn't stay connected for longer than a minute and couldn't see half t he variables... this is nice and all, but eventually, I arrived at a question.

    Why should I waste my time doing all that?

    Why can't something like this just work out of the box?

    I'm not finding good answer for those.

    Unity has been acquiring some companies left and right, often with nothing to show afterwards, but this convenience feature is apparently something a single person can quickly fix. And it wouldn't cost as much as buying a company. Editor in question is not something obscure and unorthodox, and we aren't talking about something like full vim/emacs integration. VSCode is popular, frequently used, as demonstrated by stackoverflow poll earlier. So supporting it would make editor more attractive to more people. Why is it not being done? Why is this stuff fixed by volunteers, why aren't those people paid and why aren't those features official?

    Those are rhetorical questions.

    The thing is, small things like that matter, because they can pile up and then it is straw and camel's back scenario. At this point it feels like I'm being nudged to switch away. For example, unreal engine supposedly has VSCode support (it is in their docs), and godot is unlikely to have problems with it. (and me considering godot means that the hell is about to freeze over)

    All things considered, would be great if someone "up there" in the management reconsidered.
     
    brandonsTP likes this.
  23. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,066
    dnnkeeper and TheSleepyKoala like this.
  24. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    Well, compare C#/dotnet to Java, which is open source. Say, IntelliJ offers IDEA for Java free of charge. Why? Cos there's nobody at Java jerking stuff left and right every now and then, keeping everybody locked in to the standard that they're setting. They don't need to put in the hours whenever something changes.

    You can think of a standard as a contract. Now, what if one party has the sole right to alter the contract?

    upload_2023-7-26_16-57-55.png

    That's why if you want your stuff to be 1. good, 2. free, you need to promote and use open standards. People will argue that C# is an open standard but come on. VSCode, the C# plugin and C# Dev Kit are all Microsoft proprietary products.

    When Unity are saying it takes too much work to support VSCode, I suggest you believe them. Nobody here knows how it is to actually support the VSCode versions. People are assuming that it doesn't take much work, but then again, now that some are using the community fork, we don't really know how well it works, because there's no guarantee that it works because it's unofficial.

    When Unity supported VSCode, it was official support, they had to guarantee that it works, and when something didn't work, they had to go and fix it. This is currently not happening, and for all I know, the fork might be broken in many ways already with the new VSCode versions.
     
  25. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    I reject your suggestion.
    There's no reason to believe a claim when reality contradicts the claim.

    The original extension was done in one week and could be fixed by a single person.

    The talk about open/closed standards and vendor lockin also is not related. An engine that supports standard tools is more atractive than engine which does not. And Visual Studio Code at this point is a standard tool.
     
  26. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    Then switch to Unreal Engine like you threatened, or to Visual Studio or Rider. You'll feel the price of the change.

    You won't switch. You'll just sit here and blame Unity. Cos there aren't any more C# alternatives, those are your only options. And they are costly.

    For Java theres a zillion options.
     
  27. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,066
    Saying C# is proprietary is as absurd as saying Java is fully open. Roslyn, the runtime, VSCode, the C# language extension and OmniSharp are all open-source as well (MIT licensed) – while it's true that part of the C# Dev Kit is proprietary (and I'm a bit unclear if the new language server will be open-sourced). On the other hand, Oracle is still controlling Java, even if maybe to a lesser extent than Microsoft is controlling .Net (e.g. see Apache leaving the Java Community Process). Both .Net and Java exist in the limbo that is today's corporate-controlled open-source landscape.
     
    KillDashNine likes this.
  28. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    I never said that lack of dotnet editors is due to C# being proprietary. I just said nobody wants to go into that world. Like why Magnus Carlsen won't play Hans Niemann. He never said Niemann is a cheat (cos he can't prove it). He just said he has a reputation of being one.
     
  29. TheSleepyKoala

    TheSleepyKoala

    Joined:
    Aug 24, 2018
    Posts:
    24
    Unity or third-party doesn't matter. What the package is doing for the user is what's most important! :)

    However, if I don't like something about the package, I won't need to spam the forums looking for workarounds or send in bug reports/feature requests. I can sort the issue out myself. (you can too via fork)

    I can't get that type of perk with a Unity-only package.;)

    I agree with you. They should have provided mine as a replacement in the registry. :p
     
  30. Actually you can and you do. You just don't fork it in GitHub for the most part but copy the package from the
    Library/
    folder into the
    Packages/
    folder so it becomes local package which can be modified.

    Although most people never do, because the "if Unity had open source license we wouldn't have these problems" is a big, fat lie. Most people don't even bother to look at what Unity's packages do, let alone modifying any of them.
     
  31. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    It does matter. If a package is not promoted/developed by unity itself, it indicates that unity does not care about VS Code users, and that's a reason for concern. A package maintained by unpaid volunteer means it may die any second. For example, we had UMA project which was quite powerful, it went opensource, and now if you go to its repo, you'll see it was last updated 2 years ago.

    While "official support" brought up earlier absolutely does not guarantee that things are going to work (VS Code extension was always glitchy), it does indicate where the company is heading and what it is focusing on. And that's why those things should work out of the box.

    They could do that, and even better idea would be for them to hire you as a contractor to maintain it as a part time job/contract. But that obviously ain't happening.
     
    Last edited: Jul 27, 2023
  32. Midiphony-panda

    Midiphony-panda

    Joined:
    Feb 10, 2020
    Posts:
    243
  33. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    The whole deal is so simple to solve that I don't even know why this conversation keeps going on. @TheSleepyKoala subcontracts Unity to maintain the plugin, and @neginfinity pays the bill.
     
  34. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Microsoft designed VS Code primarily for web development so they could remain relevant in that space. Support for other languages like C# is a "bonus" due to its extensibility and are heavily community driven.

    Microsoft still wants companies to pony up cash for Visual Studio Professional/Enterprise for "proper" C# development, so they are willing to put effort in making Unity work with it out of the box: the Visual Studio package is actually maintained by Microsoft (not Unity), the same way JetBrains are the ones behind the Rider package. Meanwhile Unity just enjoys the benefits of having others deal with IDE integration without spending a dime on it.
     
  35. KrisGayClipwire

    KrisGayClipwire

    Joined:
    May 26, 2021
    Posts:
    41

    Attached Files:

    Midiphony-panda likes this.
  36. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    Probably due to just accident. I think you should let them know.
     
  37. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,066
    I can see two reads on all the documentation not being updated.

    The bad one: Unity's communication is so bad that even some people working at Unity and Microsoft don't know that VSCode support has been dropped.

    The less bad read: Unity is purposefully holding on updating the documentation. This only makes sense if they hope to find an alternative and don't want to make a too big splash in the meantime. Like I said before, they could be trying to pressure Microsoft into taking over development of the package, and while they don't want to look bad dropping support they also want to increase pressure with this post / the deprecation of the package. Or there is some disagreement inside Unity and the deprecation is not actually completely final.

    Either way, it really doesn't shed a good light on Unity.

    You can read through some issues on GitHub from the debugger extension. This has been in the making for a long time and the director of the .Net tech group at Unity said in the second issue they would update the documentation in January. There has been plenty of time, opportunity and reminders. If it really is an accident, a lot of things must have gone wrong at Unity.
     
  38. jeffgamedev

    jeffgamedev

    Joined:
    Mar 23, 2013
    Posts:
    2
    A huge disappointment, and complete disregard for users, as usual.

    For what it is worth to developers open to change, for future projects, start looking into Godot 4+ with C# support. It is great and works like a charm with VSCode!
     
  39. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,175
    It's fantastic to know that when they finally achieve a meaningful market share in 2050 we can attribute some of that to VS Code. :p
     
    Last edited: Jul 27, 2023
    Lurking-Ninja and TheSleepyKoala like this.
  40. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    Yeah you mean debugger for the editor they just said they won't support anymore. I think you can wait quite a long time. Meanwhile why not just debug?

    upload_2023-7-27_22-32-56.png
     
  41. TheSleepyKoala

    TheSleepyKoala

    Joined:
    Aug 24, 2018
    Posts:
    24
    I just noticed that you can't even comment anymore which is odd. :/
    upload_2023-7-28_8-37-22.png
     
  42. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    "Rider is available on linux"

    Sheesh.
     
  43. CarePackage17

    CarePackage17

    Joined:
    Dec 6, 2014
    Posts:
    22
  44. TheSleepyKoala

    TheSleepyKoala

    Joined:
    Aug 24, 2018
    Posts:
    24
    Hmmm doesn't look like they are supporting much vscode-wise. I like what they did with the project generation, though.

    This should be what you are looking for but it hasn't been worked on for quite a while.
    https://github.com/peposso/vscode-vstu-debugger
     
    Last edited: Aug 1, 2023
  45. CarePackage17

    CarePackage17

    Joined:
    Dec 6, 2014
    Posts:
    22
    It does to me though?
    The file I linked to does the installation discovery part. There's other files that do sdk-style project generation, and both are needed to support VS Code.

    I've seen that before but couldn't recall. So I guess debugging might not work on Linux in that case, right? At least I'm not aware of VSTU ever existing on Linux so far.

    Either that or Microsoft actually put in the effort. I need to give the package a spin soon-ish.
     
    TheSleepyKoala likes this.
  46. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,175
    Laicasaane and TheSleepyKoala like this.
  47. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    361
    With SDK style project we don't have to worry whether it is VS or VSCode anymore, I suppose?

    upload_2023-8-2_14-44-5.png
     
  48. CarePackage17

    CarePackage17

    Joined:
    Dec 6, 2014
    Posts:
    22
    VS can do both, VS Code needs sdk style projects.
    Not sure what VS Code's debugging story will be, still.
    And from my experience with the pre-release C# VS Code extension, it *really* doesn't like if you have too many (50-100) project files at once (even on a powerful desktop PC); it's gonna hog your CPU and gladly take up all your memory while loading.

    Then again, it's pre-release for a reason I guess. The current, omnisharp-powered C# extension handles it better.
     
  49. CarePackage17

    CarePackage17

    Joined:
    Dec 6, 2014
    Posts:
    22
    I've installed the new VS package on Linux to try it out, here's my impressions:

    • Project generation and VS Code install detection works
    • The extension they want to recommend for debugging (visualstudiotoolsforunity.vstuc) has not been published (yet?)
    • If you have the VS Code package (or a fork) installed in the project, a VS Code install is going to be managed by whichever is initialized first (InitializeOnLoad doesn't seem to have a documented order, nor can a developer modify it as far as I know). In my case it was the Visual Studio package instead of my own fork.
    • Player project generation is not supported for VS Code (it shows up in settings but clicking the toggle does nothing)

    I'm really curious to see the debugging story as soon as that extension is published.
     
    jbevain-msft, sailro and Laicasaane like this.
  50. CarePackage17

    CarePackage17

    Joined:
    Dec 6, 2014
    Posts:
    22
Thread Status:
Not open for further replies.