Will Visual Studio Code replace MonoDevelop

i think it’s got a long way to substitute MonoDevelop (or Xamarin Studio that i happily use)

what impresses me is that Microsoft is developing Visual Studio Code over Chrome technology (just like Atom editor!!!)

I’m totally pro-VS because I’m using OS X and have no plans to leave Unity development or move to Windows. :wink:

And MD is not that good.

Let’s vote meanwhile:
http://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7752702-unity-integration

That’s not correct:
https://code.visualstudio.com/Docs
Visual Studio Code includes built-in support for always-on IntelliSense code completion, richer semantic code understanding and navigation, and code refactoring.

I don’t think Code is a replacement for a full blown IDE. It does support full blown solutions. I opened an MVC 5 solution in it today that has 11 solution folders and 35 projects and it kept everything intact. However, it only supports running and debugging for Mono and NodeJS at the moment so it’s not even worth testing for everything else.

It may be a good replacement eventually for people who use things like Sublime or Notepad++ as a basic code editor but I don’t think it’s ever intended to be a full blown IDE.

2 Likes

I’m not sure what it’s talking about in that line - the discussions suggest it does those things for Web code & javascript - but it DEFINITELY does not do any of those things for C# in a Unity project.

All I need from an editor:

  • project-level auto-completion
  • snippets
  • “go to declaration”
  • rename
  • breakpoints

So I can’t see why VSC can’t replace MD for me when these features will be implemented.

That’s because it’s still a preview.

@Ox it may be able to do those things, but it likely isn’t going to support plugins, thus probably no Unity debug integration. That’s just speculation though.

Language support isn’t there yet for me, almost seems like they realized VS is overkill for web developers who just want to do JS or Typescript and split it out and made it multiplatform. I’m looking for something that supports Go and Python mainly which Sublime does a good job of with plugins.

@tiggus I’m assuming it will get more support though. At a minimum they’ll need to have some kind of console and make it easy to use tools like grunt and jasmine

I just configured Code as my external code editor in Unity and made sure the box to allow debugger attaching was checked.

I then did “Sync MonoDevelop project” from the Editor. I don’t think that did anything, since Code doesn’t deal with project files.

I switched to the Debugging tab of Code, chose “Attach” from the configurations list, and hit Run… I get an error:

“Cannot start OpenDebug because Mono (or a Mono version >= 3.10.0) is required”

Does anyone know what this means? Is there a way I can install Mono for Code, or on a system-wide basis on my Mac, such that this might work?

I don’t think this app is ever going to be for anything but web development as its even titled like that on web and announcement news. It’s far from decent IDE and probably has no VS .NET projects style stuff in the roadmap at the level that it would ever replace MonoDevelop. Most of the posts and comments around the net seem to indicate that this is primarily fast and light web editor and debugger with quick repo access.

Like I said it has no autocomplete for the .NET world, like as in knowing the context its invoked. Now it suggests all words it finds from the open document which is useless. The refactoring it has is a simple text replace tailored for web development type files.

This is incorrect.

  • In Unity, “Sync MonoDevelop Project” to generate your solution files (if they aren’t there already)

  • Open your root project folder in Visual Studio Code.

  • In the lower-left, next to the flame icon, click “pick a project”:

2091269--136782--Screenshot 2015-04-29 14.43.50.png

  • Select your -csharp.sln file:

2091269--136784--Screenshot 2015-04-29 14.45.08.png

Autocomplete for Unity classes:

2091269--136785--Screenshot 2015-04-29 14.45.52.png

And for .NET classes:

2091269--136786--Screenshot 2015-04-29 14.46.44.png

2091269--136784--Screenshot 2015-04-29 14.45.08.png

13 Likes

It does have auto completion. You have to setup the solution file by clicking on the fire icon at the bottom left of the interface.

If it does prompt you for mono >= to 3.10, install mono with homebrew (on OSX). It should work then.

I didn’t try it much for the moment, but it seems to be fairly decent, at least to replace Sublime (I don’t like MD at all, so I’m unable to compare).

Update: someone did a better job than me. Just look above. :wink:

I don’t see why you couldn’t already be using Sublime. All of those are covered either by base features or plugins. There even appears to be a project working towards an IntelliSense-like plugin for Sublime.

https://github.com/quarnster/completion

Including breakpoints? I.e. the ability to connect to a debugger? I never saw a solution for debugging Unity with SublimeText.

I’m excited to hear that the Intellisense features seem to work with the existing vsproj setup… I’m installing Mono with Homebrew on my Mac now to try some more! If debugging will work I’ll be so stoked.

Confirmed that Intellisense is working! It doesn’t even require hitting Ctrl+Space to initiate autocomplete, once the project has been imported (see MatthewW’s instructions above).

2091307--136789--Screenshot 2015-04-29 17.06.25.png

I’m trying to attach the debugger to the Unity process but no luck… Anyone with a clue?

Very good of MS to make it easier to publish apps/games from other platforms to Windows Platforms. It is a smart business decision and one that leads to selection of cheap HW that supports Windows. Sort of Apple’s undoing the 1st time. Chrome OS has a long way to go to catch up to Windows in the business and government arenas…

I’m unable to get it to attach either. It appears to have a configuration option for attaching to Mono; this is at the bottom of the file that it opens if you hit the “gear icon” button at the top of the Debug panel:

{
“name”: “Attach”,
“type”: “node”,
// TCP/IP address. Default is “localhost”.
“address”: “localhost”,
// Port to attach to.
“port”: 2550
}

…I changed that number to 2550 from the default. I assume that connection via a port like this is how MonoDevelop et al connect to the Unity debugger, so maybe we just need to try the right port and this would work?

Maybe not, I just stumbled on the source for the plugin that allows MonoDevelop to attach to the Unity debugger (GitHub - Unity-Technologies/MonoDevelop.Debugger.Soft.Unity: Soft debugger client for Unity), and it doesn’t seem to use this kind of approach, it attaches to a process by ID, rather than to a local port.

I’m running into the limitation of my knowledge about how this sort of stuff works. It would be nice if someone could figure out how to get this debugger to talk to Unity’s debugger, since it appears to use Mono… if MonoDevelop can do it (and we have the code for how it does it), then hopefully there will be a way to do it in this tool too.

I just noticed that config file also contains:

// Type of configuration. Possible values: “node”, “mono”.
“type”: “node”,

but I think I need to change more than just this “type” for it to find and connect to the Mono process. And it’s possible that Unity’s debugger is a variant that would need some special mode added, as appears to have been the case for MonoDevelop.

I wonder how hard it is to extend Code’s debugging options? I’m out of time to look into this for now, but I hope someone else keeps poking at it!

I got to the same point as you @IQpierce , but no luck as well… Hopefully one the Unity guys will give us a hand.

Another thing I was trying to do was to hide all those ugly .meta files as well as the unnecessary folders (Library, obj, Temp) because it gets a bit confusing.

All in all, this is definitely going to be an awesome alternative to MonoDevelop, Xamarin Studio and Sublime for all Mac users!

1 Like