Can Visual Studio be used as a debugger for Unity?

The Unity 3.0 docs mention that Visual Studio can be used for editing code, but for debugging code the only information provided is for MonoDevelop.

Is it possible to use the Visual Studio debugger instead? (perhaps via the Mono Tools for Visual Studio add-in?)

more ▼

asked Aug 14, 2010 at 07:18 PM

avatar image

391 4 21 28

As mentioned in a comment below UnityVS plugin is now available for free.

Mar 21 at 11:55 AM nuhash
(comments are locked)
10|3000 characters needed characters left

11 answers: sort voted first

UnityVS, a third party plugin, lets you use Visual Studio as a debugger for Unity.

more ▼

answered Sep 19, 2012 at 12:35 AM

avatar image

391 4 21 28

Sadly it's not free http://unityvs.com/pricing/

Feb 27, 2013 at 08:08 PM philjhale

Another note: you need the full version of Visual Studio. VS Express will not work.

May 16, 2013 at 10:53 PM TheMaster42

Just tried the trial of it for all of 3 minutes. UnityVS can see into some of my classes which mono can't.

Dec 08, 2013 at 05:03 AM theLittleSettler

UnityVS developers SyntaxTree have just been acquired by Microsoft. You can now use Visual Studio Tools for Unity for free!

Jul 31, 2014 at 05:12 PM wip

@TheMaster42 Visual Studio Express does not currently support Extensions, and UnityVS is installed via a VS Extension, so unfortunately I don't think it'll work with an Express edition.

Aug 01, 2014 at 04:42 PM wip
(comments are locked)
10|3000 characters needed characters left

No. Only MonoDevelop can be used as a line-by-line debugger in Unity 3. MonoDevelop is a .NET-like environment for Windows and OSX.

There is a very high-effort way to get this working, as the wire-protocol that MonoDevelop uses to communicate with the builtin debugger inside Unity is "documented" as the sourcecode that writes/reads to it is opensource. It would be possible to write a Visual Studio plugin that talks Unity in the "debugger language" it understands. This is defenitely not a light undertaking however. (for implementation, see Mono.Debugger.Soft.dll in mono's sourcecode)

more ▼

answered Aug 14, 2010 at 10:31 PM

avatar image

13.3k 93 173 259

In good conscience, Lucas Meijer wrote the second paragraph, not me. ;) I'm not big on taking credit for other's work. :)

Aug 29, 2010 at 06:31 PM qJake
(comments are locked)
10|3000 characters needed characters left

I had a look at UnityVS and did a post: http://azuregames.azurewebsites.net/2013/11/18/unity-and-unityvs/

Definitely worth $100 to me.

more ▼

answered Nov 18, 2013 at 04:30 AM

avatar image


(comments are locked)
10|3000 characters needed characters left

With Unity 3.2 this feature now exists.

You have to debug using the MonoDevelop that ships with Unity 3.2.

When you have the project open in MD, click Run > Attach to Process. Then choose the Unity editor process or your running built debug exe. If you attach to the editor, you can start and stop the game editor at any time using the "play" button or Ctrl+P.

more ▼

answered Feb 13, 2011 at 05:06 PM

avatar image

452 13 16 24

Unfortunately, the "feature" I wanted was debugging from within Visual Studio. It's great that as of Unity 3.2 it's even easier to debug from MonoDevelop, but that doesn't seem to affect the situation for Visual Studio.

Feb 15, 2011 at 08:59 PM iandallas

I agree that debugging with VS would be idea, but I'm pretty sure this will not happen. I believe UT made significant custom modifications to MD and Unity to get the debugging to work.

The pain is now gone with 3.2 and MD. All you have to do is open MD and attach to process. You can attach/detach at will. You don't have to open and close Unity. MD even warns you if the code is out of sync and is fixed with a single button click.

The 3.0 debugger with MD was unusable. With 3.2 it is very useful.

Feb 17, 2011 at 02:51 AM Zyxil
(comments are locked)
10|3000 characters needed characters left

i have visual c# (free download from microsoft) and use that to write my unity scripts it has a good debugging system

but...you have to sync the visual studio project (only one click from within unity)

and a lot of the time i find i have to translate code from java to c# which can be a bore

more ▼

answered Aug 15, 2010 at 06:41 AM

avatar image

13 1

this is not an answer to the question

Jun 10, 2011 at 08:02 AM Tom 17

How did you set this up??

Jun 10, 2011 at 08:02 AM ina
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Aug 14, 2010 at 07:18 PM

Seen: 43403 times

Last Updated: Mar 21 at 11:55 AM