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 '10 at 07:18 PM

iandallas gravatar image

iandallas
336 3 3 7

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

7 answers: sort voted first

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

more ▼

answered Sep 19 '12 at 12:35 AM

iandallas gravatar image

iandallas
336 3 3 7

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

Feb 27 '13 at 08:08 PM philjhale

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

May 16 '13 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 '13 at 05:03 AM theLittleSettler
(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 '10 at 10:31 PM

qJake gravatar image

qJake
12.3k 44 80 165

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

Aug 29 '10 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 '13 at 04:30 AM

chilberto gravatar image

chilberto
16

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

I'd been wondering this myself for a while, so after seeing your question I thought I'd have a pop at it...

I just tried building a development exe and setting up the Dev Studio project to run the standalone exe (and use its .pdb) when I debug.

This lets me set breakpoints in VS, but they never get hit (although the code is clearly running).

This was better than I expected, since Unity uses mono rather than the .net framework I didn't even expect the .pdb format to necessarily work for VS.

Have just started messing about with the mono tools for Visual Studio. will post back if I have any joy (don't get your hopes up!).

darbotron

more ▼

answered Aug 14 '10 at 11:16 PM

darbotron gravatar image

darbotron
217 7 9 16

TBH it looks like it's not possible.

In fact I've had a look around the questions site and people from the Unity dev team have said as much.

darbotron

Aug 14 '10 at 11:23 PM darbotron
(comments are locked)
10|3000 characters needed characters left

with the mono tools and a modified version / adopted version of the u3 monodevelop plugin it could work.

but the mono tools for vs are a heck expensive so actually using monodevelop and report the bugs so it can be pushed forward has a much stronger longterm benefit

more ▼

answered Aug 15 '10 at 12:03 AM

Dreamora gravatar image

Dreamora
3.4k 1 4 27

Actually, MonoTools seems pretty reasonable -- $100 for a personal license and $250 for a corporate one.

Aug 16 '10 at 07:34 AM iandallas
(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:

x90
x62

asked: Aug 14 '10 at 07:18 PM

Seen: 27355 times

Last Updated: Dec 08 '13 at 05:03 AM