x


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

iandallas gravatar image

iandallas
351 4 8 14

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

9 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

iandallas gravatar image

iandallas
351 4 8 14

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

This still requires a Pro edition of Visual Studio, correct? It's not compatible with VS Express editions?

Jul 31 at 05:42 PM TheMaster42

@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 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

qJake gravatar image

qJake
12.7k 92 137 214

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

chilberto gravatar image

chilberto
11

(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

sisyphus gravatar image

sisyphus
18 1

How did you set this up??

Jun 10, 2011 at 08:02 AM ina

this is not an answer to the question

Jun 10, 2011 at 08:02 AM Tom 17
(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

Zyxil gravatar image

Zyxil
397 13 14 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
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

By RSS:

Answers

Answers and Comments

Topics:

x107
x66

asked: Aug 14, 2010 at 07:18 PM

Seen: 33937 times

Last Updated: Aug 02 at 10:36 PM