VS Code Unity Debugger Extension Preview

Update:
Thanks to everyone who participated in early preview of this debugger extension. You can now install the extension from the Visual Studio Marketplace!

Feel free to leave any comments on the extension in this thread.

Install instructions

Source code

19 Likes

Thanks! Very usefull!!

1 Like

Sounds great - How good is VS Code compare to MonoDevelop ? Iā€™m developing on a Macbook Pro and Iā€™m not that much a fan of MonoDevelop.

Thanks.

I think it is up to the individual developer decide how good any code editor is and which one they like best.

The VS Code website has some information on how to get started with VS Code and Unity: https://code.visualstudio.com/Docs/runtimes/unity

1 Like

Thank you Lukas.

I seem to be having this problem when pressing the green button. Any ideas?

Which version of Unity and the Mono framework are you using? Does this also happen to you on a new project with a single script?

I will add more logging in a future to be able to track down issues like this more easily.

I am using the beta MonoDevelop (5.9.6), but also have the beta VS Code installed. Just wondering which is preferred?

for now, it seems that VS Code is still not mature as MD. Does anyone have any good arguments for choosing one over the other ?

cant speak to how stable VS Code is, since im a VS pro user, but i think it will come down to preference. VS Code is growing very fast, and has all the basics down.

Though i have noticed the syntax highligting of VS Code dost seem quite right yet. It dosnt seem t highlight type names in code like VS proper or MonoDev would, which really harms readability. The weird part is that OmniSharp obviously know what the types are since it will give a next tooltip for Typename when hovered.

1 Like

I was quite impressed with VS code and it does have some really neat features, like listing number of references next to attributes. The highlighting is as mentioned not that good by some reason, the only deal breaker as I see to use it in daily development is that it lacks tabs. The font rendering on Mac is also a little iffy compared to old Monodevelop or Sublime text.

VS Code is already really good. Itā€™s maybe missing a few things here and there, but the addition of extensions in the latest version and the fact that itā€™s open source will probably make it evolve even faster.

I believe the lack of tabs is by design. Itā€™s a different approach to file editing. Rather than having a few visible tabs on top, you have a list of all files youā€™re currently editing on the left, under ā€œworking filesā€. Itā€™s a much easier way to browse, and names are more visible. But itā€™s also a different paradigm than most editors use, so I can understand why it doesnā€™t feel natural to some peopleā€¦ but, once you get used to it, itā€™s a much better approach to editing projects especially when you take source control into account.

This is pretty symbolic of what VSC is to me. Itā€™s not trying to be a clone of Mono Develop, or Visual Studio. Itā€™s only doping the basics so far, but doing it better because it can start from scratch and from lessons learned in other lightweight editors like sublime. Thereā€™s no ā€œproject filesā€ either - you open the folder and thatā€™s your project. Thatā€™s another example of the editorā€™s anti-monolithic approach.

If it has a ā€œtrim trailing whitespaceā€ option, Iā€™m sold.

ya lacking of tabs dosnt bother me, since it is often faster to just control+P and mash a few letters in the class name you want.

Also great that it has extensions, would be dam nice if it starts getting resharper like features as extensions, and some good vim bindings

Iā€™ve been using this to do my work this morning and so far it is working mostly great. You might want to add some additional steps to the Install Instructions to tell people how to set VC Code as their external script editor and set "window.openInNewWindow": false in the settings file to make this a full workflow replacement of Monodevelop, since some people may have never user alternative script editors.

VS Code doesnā€™t seem to understand namespaces very well though. In this example it claims the EggZagStoreData class doesnā€™t exist, which is defined under the Elink.Eggzag.Store namespace. EggZagStoreData extends from ScriptableObject which extends from Object so it should have a definition for name but youā€™ll notice that this.name is also highlighted.

I agree with Cybexx, namespace arenā€™t working all that great for now. Same with hovering on static member variables, but that could be a consequence of the namespace pb (static function nested in class nested in namespace). Same when adding these variables into the watch window ā†’ not evaluated.

Also, I wish I had some sort of project and see/browse all the files (maybe I missed something), something like Alt-Shift-O (for those familiar with Visual Assist). A similar search for symbols would also be VERY nice.

Overall, this is promising. VS Code wasnā€™t available ~6 months ago and itā€™s getting a lot of love. A few more strong iterations and weā€™ll be able to ditch Mono (no tears here!) and wonā€™t have to bother with Visual Studio running in a VM.

Iā€™ve been using VSCode to write C# scripts for my Unity project on OSX, but it seems to fail at the most basic tasks.

The format code option hasnā€™t worked for me in the past few releases of VSCode on OSX - even when selecting a block of code, right clicking and hitting ā€œformat codeā€ it does nothing.

And the autocompletion is very strange, when I write ā€œif(ā€ it often replaces it with ā€œif(())ā€ā€¦

Is anyone else having similar issues with developing for Unity in VSCode on OSX?

å¤§čƒ”å­å“„å“„ļ¼Œ ä½ äøŗ什么čæ™ä¹ˆåø…ļ¼Ÿ 哈哈哈哈

1 Like

ę“»ę‰é‡Žē”Ÿunity大ē„žäø€åŖ

Yes it does :slight_smile:

:slight_smile: cool ļ¼ļ¼ļ¼

Why is the installation process so cumbersome ? is there any work that is being done to improve that ?