I have mac system with Unity 3D 2017.2 installed, and I also installed Parallel Desktop with Windows 7 operating system, in Windows 7 system installed Visual Studio 2017 v15.4.2 Is it possible to debug.
April 11, 2015 How to use Visual Studio with Unity This is a quick quide on how to use Visual Studio with Unity. Visual Studio is only available for Windows, but a lot of Unity developers on Mac think it's so great they go through the hassle of using virtual machines just to use it. If you're wondering why you should switch from Mono Develop there's a section devoted to that further down. Install Visual Studio. Firstly, you'll want to go here and click 'Download' to download the tiny Visual Studio installer application.
Run the installer application. You can opt out of all the extras, I did. We don't need any of them for Unity development.
The installer claims that Visual Studio will use 8 GB split across all drives when you opt out of all the extras, but it still ate 10 GB of the drive I installed it to so keep that in mind. It's quite bloaty. You may be asked to create a Microsoft account or log in with your existing one. This is probably not necessary, but I already have a Microsoft account which I use for my Xbox so I just logged in with that. This will apparently allow you to synchronize settings etc. Across different computers.
Not something I'll use. Now that Visual Studio is installed you can launch Unity. Inside Unity go to 'Edit' = 'Preferences' = 'External Tools' in the menu bar. Browse for an external script editor and navigate to 'C: Program Files (x86) Microsoft Visual Studio 12.0 Common7 IDE' and select 'devenv.exe'. Hopefully you'll never have to look at Mono Develop again. That's it, now you can edit your scripts in Visual Studio just like you would in Mono Develop. And if that was all that you wanted to do then you can close this tutorial and continue with your Unity project.
But for those of you who want actual debugging there are still some steps left. At the moment If you click 'Start debugging' (F5) inside Visual Studio you'll get an error. Obvisouly we want to properly debug our code as well.
Quit Unity and Visual Studio, not sure if this is necessary, but let's just play it safe. We'll have to install a plugin for Visual Studio and Unity. Install Visual Studio Tools for Unity. Go and download the Visual Studio Tools for Unity.
Get the one that corresponds to your version of Visual Studio. I have Visual Studio 2013 so I chose the corresponding version of Visual Studio Tools for Unity. Download the plugin. Install the plugin.
This should be a one click installation. Now you can launch Unity again, but this time go to 'Assets' = 'Import Package' and choose 'Visual Studio 2013 Tools' from the list. Doing this will properly configure this Unity project so that it can be debugged using Visual Studio. NB: This will automatically configure your external editor settings, meaning the manual setup we did earlier isn't necessary. I just did that to show you how you could set it up if you didn't want or need debugging.
For any future projects you just have to import the plugin and you're done. This can be done directly from the Unity launcher when you create the project. You'll need to import this into all the projects you want Visual Studio debugging for. A small price to pay in my opinion. Now that you've imported the Visual Studio for Unity plugin you'll notice that a 'Visual Studio Tools' menu item has appeared in the menu bar at the top. This has some settings etc. For the plugin.
I haven't needed to touch these so I just left them alone. This plugin will make debugging inside Visual Studio work just as easily as it does inside Mono Develop. I'm assuming you already know how to debug your code so I won't go into that. However if you don't know, and you want to learn you can just ask me and I'll try to help you as best I can. There's also a lot of information available.
Other features I also use are the Unity Project Explorer. It shows you your folders and scripts inside Visual Studio just as they appear inside the project window in Unity. The quick documentation access which lets me quickly go to the documentation page for a Unity method. And the Monobehaviour wizard which lets me quickly create methods like OnCollisionEnter etc. Without having to remember their name exactly. This plugin offers a lot more functionality as well, I just haven't needed it myself yet. You can debug builds for example.
Check out for more information about the features I've listed here and all the other features as well. And that's it. Now you can do all the things Mono Develop allowed you to do in Visual Studio instead. Why change from Mono Develop? I've only told you how to get Visual Studio to do the same things you were already able to do in Mono Develop so why should you bother going through this hassle? If you are perfectly happy with Mono Develop and don't feel like there's anything wrong with it then there's probably not much I can say to change your opinion, but here are my pros and cons of using Visual Studio over Mono Develop. Pros:.
Mono Develop is one of the slowest IDE's I've worked with. Visual Studio is one of the fastest.
I find that in larger projects or code files Mono Develop will slow to a crawl. Visual Studio isn't faced by this. I have two fairly persistent bugs with Mono Develop. The first is that Mono Develop will permanently stick on top of all my other windows.
So it's impossible for me to ALT+TAB to Unity or any other application. The only fix is to restart Mono Develop. The second bug is that suddenly I can't interact with any part of the Mono Develop interface except for the text editor area. So I can't change tabs or do anything with the application itself. The only fix is of course to restart Mono Develop.
![Unity Tools For Visual Studio Mac Unity Tools For Visual Studio Mac](http://michaelcummings.net/Media/Default/Windows-Live-Writer/Configuring-Unity-to-use-Visual-Studio-2_8F85/image_10.png)
Apart from these two I also have many smaller, equally annoying bugs. Sometimes the syntax highlighting would stop working, or it would stop highlighting errors, or the code completion dropdown would refuse to show. Mono Develop also crashes quite a few times entirely on its own. I've never experienced this with Visual Studio. I've also had no luck in getting my Unity errors to automatically show inside Mono Develop.
I know I can get them in Mono Develop if I build my project in there, but this is cumbersome and unnecessary. In Visual Studio this just works. You can even see the Unity console inside Visual Studio. The Visual Studio code completion is lightning fast and precise compared to the one in Mono Develop. The developers of Mono Develop suddenly decided that they would stop showing column numbers.
![Unity Tools For Visual Studio Mac Unity Tools For Visual Studio Mac](/uploads/1/2/5/4/125454738/692884967.png)
A feature every text editor has and every developer takes for granted. Because of this the Mono Develop error log can't even show you the column the error occurred on, which is pretty funny. Not a huge deal in itself, but it makes me question the competence of the people in charge. Visual Studio has an actual footer which shows you the current line number and column number just like you would expect. And the error log shows the column of the error, just like you would expect.
I've given up trying to make Mono Develop try to respect my coding standards. It seems to reset to tabs instead of spaces, 120 column width, the wrong brace placement etc. Every single time I open it. By comparison it's amazingly easy to customize Visual Studio to respect your coding style once and forever. Speed, speed, speed. I can't stress this enough.
Visual Studio is so much faster than Mono Develop. Try writing some code in Mono Develop and then try writing the same piece of code in Visual Studio. You'll be amazed if you haven't used Visual Studio before. The automatic formatting, the code completion, everything is just so quick and snappy. Cons:. Visual Studio is 10 GB, Mono Develop is 200 MB. Visual Studio comes with a ton of crud you'll never ever need.
I haven't yet been able to configure the syntax highlighting in Visual Studio the way I want it. I think it's possible, but Mono Develop currently has better syntax highlighting in my opinion.
I haven't mentioned the debugger at all. That's because I haven't been able to use it much with Unity.
I never used the Mono Develop debugger because I felt it was slow and cumbersome, and most recently I've only been using Visual Studio for about a week with Unity. I used it for years with XNA and I loved using the debugger there so I have no reason to think it has gotten worse, but I feel like I have to become acquainted with it again before I can voice my opinion about it. I used Visual Studio C# Express with Unity 2 before I switched to Mono Develop when Unity 3 came so I feel I have some experience with both editors, and I find Visual Studio to be the superior choice.
With Mono Develop I felt like I had to ALT+TAB back and fourth between Unity all the time, with Visual Studio I rarely open the Unity editor at all. But I've gotten used to the dark Mono Develop skin Don't worry, I've got you covered. The dark Mono Develop skin is called Oblivion and someone has made a version of it for Visual Studio available. The FAQ will tell you how to install this skin in Visual Studio. Keep in mind this is just for the text editor, not for the entire application. But often that's the only thing you care about. I chose the Visual Studio dark skin for the application and I think it goes great with the Oblivion text editor skin.
This is how my Visual Studio looks. It's the default dark skin with the Oblivion text editor skin. I also changed the breakpoint column from white to black. However, If neither the blue, dark or light application skin is to your liking you can install. It comes with a few custom skins for the entire application, and you can also create your own skin based on an existing one. And that's it.
Now your Visual Studio is configured just the way you want it and it should work flawlessly with Unity. If you're stuck on something or have any questions I'll be happy to help you. And if you're wondering why I've only recently switched from Mono Develop to Visual Studio it's because you used to need Visual Studio Pro to do this and it was very expensive. And when they made Visual Studio Pro free with the release of the Community Edition I wasn't paying attention. Let's just say that I hate myself for not finding out sooner, but I'm glad to be back with Visual Studio again. Thanks for the awesome tutorial. Working through the solution, I noticed that the link to visual studio 2013 tool for unity should be Also on this page there is a link to the Unity 5.2 users, read our documentation about Unity's native support for VSTU.
Where it says ' Starting with Unity 5.2, the Visual Studio Tools for Unity integrate natively inside Unity, which requires VSTU 2.1. There is a slight change in the workflow and in the configuration of Unity that this page documents. The biggest change is that you don't need to import the VSTU Unity package anymore with Unity 5.2. Unity will detect if it's installed, and if so, load it for you.
From that point on, VSTU will handle the generation of the project files for Unity, and opening files from Unity will open them inside the VSTU solution. Unity 5.2 will ignore the VSTU package if it is imported it your project, and will always load VSTU from its installation folder.
We encourage you to delete the former UnityVS folder from your Unity 5.2 projects. The only thing you need to do is to set Unity to use Visual Studio as the external script editor. ' Hope this helps for people installing visual studio 2013. Thanks again for getting this up and running for me! Why do you suggest this tool over MONO Develop!!!! Mono develop offers suggestions, it helps you fix problems in code, Visual Studio 2017 just sits there, dumb and blind!
I picked anything that said 'UNITY' when installing it, it took more like 60GB for me! BUT it most certainly does not do any sort of Intelligent Help that Mono Develop does. Is there any way to slap Visual Studio upside the head and wake it the $.%^$ up? PLEASE ANSWER, I HAVE 3 GREAT UNIQUE VR APPS IN THE WORKS AND NEARING COMPLETION but the final debugging is a NIGHTMARE with Visual Studio. You seem to like it.?
Surely I am missing something though, I don't see any way to get it to pay attention.
. In the beginning there was Visual Studio. For many years, it was essentially the only tool that offered a comprehensive IDE with useful functionality that could be used for enterprise-level.NET development. Other tools existed, of course, but they were generally no match for Visual Studio. In recent years, this landscape has somewhat changed: we now have, and, more recently,. Not all of these are free or open source, and, in general, this shows up in the quality of the tool or the features it offers.
This is not to say that open source does not offer high quality stuff – I have been an advocate of NHibernate for years – but only that companies that can spend money in having full time developers working on something usually benefit from that. In this post, I am going to talk about Rider and how it compares to Visual Studio. You may remember Visual Studio was already covered in. How Rider Compares to Visual Studio Rider from JetBrains only has a paid version, not a free one. This differs from Visual Studio, which also offers a, of course, lacking several features of its. It’s features are listed on JetBrains site. Rider originates from other JetBrains such as and but now turned into an IDE.
It is cross-platform, meaning, it can run on both Windows, Mac and several flavors of Linux, offering the same set of functionality and identical behavior on all of them. Visual Studio also supports Mac and Linux, but not all of these platforms have the same feature set.
This is a big advantage for Rider: it just looks and behaves the same everywhere. Rider’s Look and Feel Rider is responsive and customizable, you can pick your color scheme, keyboard bindings and what not. I find it to be fast and responsive too. You can have multiple windows showing the way you want them, even collapsed, and then save the settings. Rider’s Projects Out of the box, Rider offers several project templates for.NET,.NET Core, Unity and Xamarin projects, which are roughly identical to what you get with Visual Studio: More project templates can be added online (see repository ) or through downloadable templates.
Some extensions add other templates too. The solutions and projects that Rider works with are fully compatible with Visual Studio’s, that is, it doesn’t use any proprietary format. You can create projects using the C#, F# or VB languages, but not all of these languages are not available for all project types. You can target any of the installed.NET Framework versions, but only the latest.NET Core or.NET Standards. For ASP.NET Core projects, you can pick a.NET template that uses Angular, React or React and Redux: When in a project, you have the solution and the structure view, where you can see a structure’s internals. Visual Studio shows the types inside of each file, this is missing from Rider.
Rider does offer a structure view, I’ll talk about it in a moment. As one would expect, we can browse installed and available NuGet packages, identifying those that are available offline (from local cache): Source Control When creating a new solution we are prompted to create a new source control repository, Git and Mercurial/Hg seem to be the only supported types, but in other places we can see that Rider works well with Team Foundation Services, CVS and Subversion too.
In the case of Git – the one I use the most – it offers many features not available from inside Visual Studio, like stashes and patches. There is a diff viewer that can show two versions of the file side by side or in an integrated view, with some interesting options such as collapsing unchanged blocks. It even shows local history, the changes that you made to files in your solution in the current session, and allows you to set labels to mark specific moments in time. Validations Visual Studio has had static code analysis and validation for a long time, and it is incredibly useful.
Rider also includes these rules, so it validates your code as you write it. It does a lot more than just language checks, for example, it can show certain code constructs as errors, like the missing of a named view, for example: Rider shows all solution validation faults as errors in a project tab, and you can apply certain filters to it: As you can see, it can show errors that are specific to a certain library, like.NET Core,.NET Standard or.NET Framework versions.
Like Visual Studio, it will underline each solution, project and file that contains errors. However, I must say that I got at least one false positive: Rider wrongly marked a code reference in a.cshtml file as nonexistent where in fact it did exist. Rider doesn’t validate just.NET code, JavaScript is also checked. If you are using features from a more recent version of JavaScript and your project is set to target an older one, you will be warned about it. If you use a CSS class for which there is no definition, you get a warning too. Code Refactorings Modern versions of Visual Studio already provide a great number of refactor options, but Rider, unsurprisingly, exceeds this.
Essentially, Rider is ReSharper, so you can expect anything that was available in ReSharper to be here too. Virtually any line of code can be refactored, even if just for chopping long lines or introduce variables, parameters or fields instead of hardcoded (“magic”) values. Rider can invert the logic of a conditional block, extract code to a new method, create a derived type, move methods to a different file (partial classes), convert a property to a method, turn an instance member to a static one, remove “this” declarations, etc. Renaming a namespace or a type takes care of all its references (using statements), as one would expect. A useful refactoring uses the base type instead of derived types whenever possible (as per Liskov Substitution principle), another one generates a base type for an existing one, optionally moving some members to it.
Another one checks members for their visibility and offers to restrict it, if it can be done without breaking anything. Good to know that all of these can be undone. The provided refactorings are one of the strongest aspects of Rider – it can even suggest improvements that are specific to Unity. It’s not without its flaws, though: it offered to make the Startup class abstract as it’s not being referenced anywhere, but it should know about the role it plays in.NET Core.
Something to improve! Code cleanup is not a refactoring, but does exactly what it says: removes redundant code (eg, redundant “this” keywords, unnecessary imports, etc). Unit Tests Common unit test frameworks (xUnit, MS Test, NUnit) are supported, in both.NET “full” and.NET Core. There is a test explorer not unlike that of Visual Studio, and you can create sessions and add tests to them.
An interesting feature is to run tests repeatedly until failure. All in all, pretty similar to the VS experience. Extensions Rider extensions are called plugins. There is a wide range of them available for free (961 at the time this article was written), and you can see the list for yourself. It is possible to see this list from inside Rider, of course, and here you can search for what you’re interested, even in other repositories or even from the local file system.
Like in VS, you can also disable a particular plugin. These plugins are either contributed by the community or provided by JetBrains, and they are all made available for free.
Some features of Rider come from features, for example, F# or CoffeeScript support. Execution We can have multiple execution configurations. On each we can specify environment variables to be set prior to execution, the target framework to use, program arguments, the browser to launch (in the case of a web application) and whether to debug it. It is also possible to specify multiple build steps, which actually get translated to MSBuild tasks. This is actually quite nice, as it’s easier to work with than MSBuild XML. Interestingly, there doesn’t seem to be a way to run web apps through IIS or IIS Express without significant configuration – creating a new configuration, setting IISExpress.exe as the executable, setting parameters, etc. Code Navigation Code highlighting and completion works pretty well across all supported file types, and jump to definition also works well.
Rider will automatically find TODO and BUG comments on your code and show them on a dedicated tool window. If you want, you can specify additional patterns as regular expressions. Pretty similar to Visual Studio. Another option is to add bookmarks to lines of code. Bookmarks can have a description and a mnemonic consisting of a short number of letters and number and you can jump directly to them.
Again, VS offers a similar feature, although you don’t have a centralized spot where you can see all your bookmarks. Conclusion I must say that Rider is pretty impressive.
Not only does it offer most features of Visual Studio, even of quite expensive editions, but it even has more. I’d say all of the features that we can expect from an enterprise-level tool are present. Visual Studio still defines what should be in a.NET tool, but Rider follows this quite closely. Some more advanced features will still be in Visual Studio only (WPF editor, for example), but if you go with Rider, you probably won’t regret it.
About Ricardo PeresRicardo Peres is a Portuguese developer, blogger, and occasionally e-book author. He has more than 17 years of experience in software development, using technologies such as C/C, Java, JavaScript, and.NET. His interests include distributed systems, architectures, design patterns, and general.NET development.He graduated in Informatics Engineering from the University of Coimbra and currently works for London-based Simplifydigital as a Technical Evangelist. Ricardo was first awarded as Microsoft MVP in 2015.Ricardo maintains blog Development With A Dot, where he regularly writes about technical issues. You can read it at authored ebooks NHibernate Succinctly, Entity Framework Code First Succinctly, Unity Succinctly, ASP.NET Multitenant Applications Succinctly and Entity Framework Core Succinctly for the Succinctly series of Syncfusion.Ricardo also wrote Entity Framework Core Cookbook - Second Edition, was the technical reviewer for Learning NHibernate 4 and is currently writing Mastering ASP.NET Core for Packt Publishing.You can catch up with him on Twitter at http://twitter.com/rjperes75.