Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Visual Studio debugging for Unity is finally here!

Discussion in 'General Discussion' started by kersk, Aug 24, 2012.

  1. EthanHunt

    EthanHunt

    Joined:
    Oct 9, 2012
    Posts:
    14
    Still waiting for the public trial. I really want to stress test it before pulling money out of my wallet, since $125 is a considerable investment.
     
  2. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Hey Ethan,

    Currently our manpower is focused on our hundred of customers by:

    • Fixing bugs they reported,
    • Implementing features they requested,

    We sure want to grow our customer base, and that includes making a public trial available, but the current focus is on customers. We take a lot of pride in having a great customer support.

    Now as I said up there, anyone who just can't wait to give UnityVS a try can contact our support and we'll help them out with a private trial.
     
    Last edited: Oct 15, 2012
  3. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    If this is a confirmation that UnityVS works with

    MAC OSX 10.8.2 (Mountain Lion)
    VMWare
    Unity 3.5.6
    (Including iOS Dev)

    I will surely buy this in the next few days, no doubt.

    whydoidoit you running OSX10.8.2?

    Thanks
     
  4. EthanHunt

    EthanHunt

    Joined:
    Oct 9, 2012
    Posts:
    14
    Hi, thanks for replying. I actually bit the bullet and bought the license. It turned out quite fine. This plugin, together with ReSharper is a real super combo. Nice job there.
     
  5. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    Great tool... bought it yesterday and it works as expected. I simply stumbled upon a problem with stepping into a line of code when debugging:

    if I have a line of code like this:
    Code (csharp):
    1.  
    2. *    StepIntothis( obj1.GetValueByFunction(), obj2.GetValueByFunction());
    3.       othercode;
    4.  
    and later on:
    Code (csharp):
    1.  
    2.     public void StepIntothis( float _a, float _b)
    3.     {
    4.         do something...
    5.     }
    6.  
    I cannot step into the "StepIntothis" function without setting a breakpoint in it. If I hit F11 at the "*" line, it steps into the "GetValueByFunction" of one of the objects. Upon exit of the "GetValueByFunction" it's right behind the "StepIntothis" call in the othercode part.

    Perhaps I did something wrong, but it doesn't seem to show the usual step-into behavior.

    Can anyone confirm this? I'll post a bug report if it really behaves like this.
     
  6. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Thanks Ethan!
     
  7. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    I don't think you did anything wrong. We have that in the list of known issues:

    Stepping in and out of methods is sometimes capricious. This is related to a couple of bugs in Unity's scripting engine.


    Some fixes for the scripting engine went into Unity 4. It should be more reliable in this regard.
     
  8. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442

    Hi so that I understand well, will I be able to run the following

    1) Under OSX 10.8.2 : Unity Engine 3.5.6 (which of course already does)
    2) Under VMWare: Visual Studio 2010/12 with Resharper (which of course already does)

    3) Then use UnityVS (installed on OSX I guess as a plug in for Unity?)

    4) Thanks to UnityVS I'll be able to use Visual Studio running on the virtual machine ( VMWare) smoothly with Unity-Running-In-OSX to debug/code/etc...

    Right?

    Will I? :)
     
    Last edited: Oct 17, 2012
  9. mboog12

    mboog12

    Joined:
    Oct 4, 2011
    Posts:
    91
    bought this marvelous plugin! i'm very excited about it because it works like a charm.

    question : can i debug with two computers, one mac that runs the editor and one pc with visual studio 2010?
     
  10. EthanHunt

    EthanHunt

    Joined:
    Oct 9, 2012
    Posts:
    14
    How many computers can I install this on with one Personal license?
     
  11. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Hey Ethan,

    We let you use it on two computers as a convenience, so you can use a desktop and a laptop computer.
     
  12. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    Bought it, will set it up later when I get to my MAC

    --- Update ---
    Did basic setup and appears to be working

    - MAC PRO Early 2008 - OSX Version 10.8.2
    - Unity Pro 3.5.6f4

    - VMWare Fusion: VMware Tools Version 9.2.1.16070 - Build 818201
    - Windows 7 Professional: Version: 6.1.7601 Service Pack 1 Build 7601
    - Visual Studio 2010 Professional: Version: 10.0.30319.1 - .NET Framework Version 4.0.30319

    UnityVS package imported in Unity just fine and UnityVS.Projectname.sln created
    Connected from Visual Studio to Unity through the Unity Icon in Visual Studio
    Visual Studio in Windows opened the sln just fine and the Unity Project Explorer within Visual Studio works

    It was just a project with a couple of .cs scripts and no functionality yet, new project just started on Unity3.5.latets version so I have to work on the project to write more code... as I go along with UnityVS see if the important stuff works (Debugging, Resharper, etc...)

    But at least the basic setup did work :)
     
    Last edited: Oct 19, 2012
  13. Robota

    Robota

    Joined:
    Feb 7, 2012
    Posts:
    82
    Hi,
    Does UnityVS is working will Parallel Desktop ?
     
  14. rosevelt

    rosevelt

    Joined:
    Oct 23, 2012
    Posts:
    47
    Just bought it after seeing mostly good from users.

    * Do you guys support debugging another thread? (This is somewhat a bit of a con(if its not there), as I'll have to switch the calling convention while debugging)

    Edit: After testing some more. setting a breakpoint within a thread context sometimes do break and sometimes not.

    * Also I noticed a quite slowish starting when clicking the play button while VS debugger is running. (in comparison to MonoDevelop) - not a major thing though.
     
    Last edited: Oct 23, 2012
  15. rosevelt

    rosevelt

    Joined:
    Oct 23, 2012
    Posts:
    47
    R# yields errors at most of the image effects files:
    [ExecuteInEditMode] --> is not an attribute
    [AddComponentMenu("Image Effects/Blur")] --> is not an attribute
    public class BlurEffect : MonoBehaviour
     
  16. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Thanks!

    Sure, our engine can debug all the managed threads.

    If a breakpoint isn't hit, you should report it as a bug, if possible with a repro so we can investigate.

    Can you measure it? It would be interesting. I didn't measure any real difference here, maybe your project triggers a pattern we haven't seen?
     
  17. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Yep those false positives are annoying us too. I'm actually working on a workaround right now, I'm tired of waiting for R# to be fixed.
     
    Last edited: Oct 24, 2012
  18. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    If by that you mean remote debugging a OS X Unity from a Parallel VM, this is currently part of our remote debugging preview feature.

    By preview feature we mean that it's included for testing, but that we know there are some issues, or that we're not happy with it all together, so it's not officially supported.

    But if you want to give it a try, contact us, we'll set you up with a trial version.
     
  19. mboog12

    mboog12

    Joined:
    Oct 4, 2011
    Posts:
    91
    hey, any reply on this question?
     
  20. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    It has been discussed in this thread multiple times :)

    We ship with a preview of this feature, meaning that it's here for you to test but that it's not officially supported as we're not completely happy with the amount of configuration it takes, and that it didn't go through proper Q&A.
     
  21. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    Hi,

    is it possible that there are some problems with the latest release of Unity 4 (f5)? I hit F5 but Unity isn't brought up front and the game is not started.
     
  22. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    Ok… problem solved… sorry for the inconvenience…

    I was under the impression, that UnityVS would bring Unity up front and started the game… which it doesn’t… my fault…

    Also the breakpoint was in a part of code that would never be reached due to a changement.
     
  23. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I just wanted to buy UnityVS ... on the Unity Asset Store ... didn't find it, and it seems you don't sell it though that channel. Do you have any plans to change that?

    It would be very nice to be able to buy it though there because that way, I'd have it in my list of Unity "add ons". And I wouldn't even mind if you add the %30 that Unity cuts (at least as long as I can still get the personal version - my company is currently just me ;-) ).
     
  24. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Hey Jashan,

    That's something we're indeed considering.

    It has a few technical issues we still need to figure out, like how to integrate with our licensing mechanism, but yeah we're considering it :)
     
  25. gunfish

    gunfish

    Joined:
    Jul 14, 2009
    Posts:
    7
    I understand remote OSX debugging isn't officially supported yet, but has anyone gotten remote OSX debug working with Visual Studios 2012 and Unity 4.x?

    I tried UnityVS + VS 2012 in both Parallels 8 and Vmware Fusion Pro 5, but was unsuccessful.
    In both setup's Visual Studios barfs the following error message when connecting to Unity 4.0.0.f7 on my Mac Pro running OSX 10.8.2

    "The program 'Mono Debugger Engine' has exited with code 42 (0x2a)."
     
  26. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    Way overpriced for me.

    As a C# developer I am going only for the VS debugging, I don't intend to pay for a bunch of more javascript developer friendly features.

    It's an amazing product, but I would have separated it into two different product - the javascript goodies and the debugging functionality.

    Cheers.
     
  27. CharlieSamways

    CharlieSamways

    Joined:
    Feb 1, 2011
    Posts:
    3,424
    Hey people, quickie question on this just so I understand.

    Does this basically allow it so that you can program in Unity but with the VS editor? I'm hearing a lot about being able to debug in VS, but I dont know exactly what that means.

    Im not much of a programmer when it comes to Java/C# but ive used VS for a quite a few years of my life, so Im just trying to see if this will be of use to me.

    Thanks
     
  28. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    Hi CharlieSamways, yes, I run Unity 4 on OSX and Visual Studio (for now I run VS 2010) on a virtual machine installation of Windows (see my post above).
    With Unity VS the two link so I write code in c# in VS in Windows and save from VS on a shared area and Unity sees the same updated c# files.
    You code in VS and Unity uses your c# files.

    Debugging means when u run PLAY in Unity you should be able to see debug information/steps in VS in real time.

    But you cannot double click an error message in Unity OSX and automatically open file and line in VS.
     
  29. CharlieSamways

    CharlieSamways

    Joined:
    Feb 1, 2011
    Posts:
    3,424
    Owh cool, this sounds really useful actually. thanks for that breakdown :)
     
  30. gunfish

    gunfish

    Joined:
    Jul 14, 2009
    Posts:
    7
    CharlieSamways,

    You can setup Visual Studios for Unity on Mac without UnityVS.
    http://wiki.unity3d.com/index.php?title=Setting_up_Visual_Studio_for_Unity_on_Mac

    However UnityVS does provide some addded benefits. such as a built in Unity Project Explorer, debugging, Macros.....
    I bought it for the Unity Mac remote debugging preview, but so far it doesn't look like VS 2012 works for remote debugging quite yet. However ProjectOne has a working VS 2010 setup that can do Mac Unity Debugging.
     
  31. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Hey, can you drop me a mail @syntaxtree.com, I recently fixed a few issues with remote debugging, and if you have any issue, it would be cool to check that we fixed it for you.

    Jb
     
  32. gunfish

    gunfish

    Joined:
    Jul 14, 2009
    Posts:
    7

    Hi Jb,

    Thanks for helping me out! With the custom interim build you sent me, I was finally able to get Mac Remote debugging working!

    I was able to use Parallels 8 + VS 2012 Pro + Unity 4 to do some basic Mac Remote debugging.
    - I was able to put in break points and continue
    - I was able to look at variables, and change them
    - I did run into the known issue where stepping through the debugger would occasionally hang Unity, but worked around it using breakpoints and continue's instead of stepping through the code for now.

    So far it's looking quite promising and usable.. Thank you for the support, and wonderful product! It has made my purchase worth it! Keep up the great work!

    gunfish
     
  33. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Thank you very much for your kind words!

    We're delighted to know that UnityVS works with Parallels 8. One more step towards fully supporting the remote scenario!
     
  34. MarkcusD

    MarkcusD

    Joined:
    Jul 12, 2011
    Posts:
    40
    Are you guys till working on a demo?
     
  35. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Hey Markcus,

    We've been basically giving trial licenses to anyone who asked at unityvs@syntaxtree.com

    Anyone should feel free to drop us a mail and we'll happily set you up. People have been loving the trial : most of the quirks from the initial release have been ironed out, so yeah, do get in touch :)
     
    Last edited: Jan 18, 2013
  36. Dusho

    Dusho

    Joined:
    Jul 10, 2010
    Posts:
    22
    Hi
    the website says it supports VS 2010 and 2012, how about older 2008? Anyone using VS2008 + UnityVS ?
     
  37. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Hey Dusho,

    Sorry but we currently only support VS 2010 and above.

    We have some tips in our FAQ on how to get a recent Visual Studio : http://unityvs.com/faq/
     
  38. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Are you planning to implement a solution to Unity's meta files? In particular: When renaming or moving a class file in Visual Studio, if you move around the meta file with the class file, everything works (Unity doesn't lose the references - I wasn't aware of that until 15 minutes ago, and this solves a lot of headaches for me ;-) ).

    Also, it would be nice if - when working with Team Foundation Server - meta files could be treated as "part" of the original file. Kind of like Visual Studio does it with *.aspx and their codebehind files in *.aspx.cs.

    I'm not even sure Visual Studio will let you hook in in a way that will support this ... but if you can do it, it would be uber-awesome ;-)

    Btw: You probably know this already ... but ... unityvs.com is currently down :-( ... I've tried through 3 different providers. Hope it's easy to fix - good luck!
     
  39. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Hey Jashan,

    If you use our Unity Project Explorer to create/rename/remove scripts from VS, we'll handle the .meta files for you ;)

    As for TFS, it's indeed a nice idea.
     
  40. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Awesome :) ... so that should make Unity play nicely with TFS, also when doing refactorings (at least when refactoring classes - refactoring public member variables is still an issue).

    Is an Asset Store release anywhere near? I'd be happy to pay $125 + 30% for the comfort of having this package in my list of Unity packages.
     
  41. whydoidoit

    whydoidoit

    Joined:
    Mar 12, 2012
    Posts:
    365
    Just to point out, it does automatically update itself even though it isn't on the Asset Store.
     
  42. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Hm, this is an interesting concern. We handle the .meta files only when you use our Unity Project Explorer (think a Solution Explorer which gives you the same TreeView as in Unity) to modify scripts. But we don't do anything in particular for files renamed outside of this scope. Now that's an interesting feature request. Hopefully refactorings go through VS files operations that we can hook on to deal with the .meta files. I'll investigate.

    I don't know if it's near, but we're certainly working on it :)

    We will however put the Pro version on the Store.
     
  43. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I've just purchased and installed UnityVS ... looks very awesome. Thank you for creating this and making it available to us (I've bit the bullet and decided to not wait until you get that onto the asset store ... I hope that some day, there will be coupons on the Unity Asset Store that will make transferring licenses from "outside the asset store" to "inside the asset store" possible ;-) ).

    Some initial first impression feedback of a brand new user:

    I have a setup Visual Studio Ultimate 2012 on a Windows 8 virtual machine, and Unity running on Mac OS X (same machine - but the host of the VM ;-) ). I have Unity 3.5.7 and Unity 4.0.1 installed on the Mac. On Windows, I only have 4.0.1 for now.

    The first thing I'm noticing when compiling the project in Visual Studio with the solution created by UnityVS are a couple of warnings. It's not a biggie but just a little unpleasant:

    I'm now seeing this only for the JavaScript and Boo projects. When compiling for the first time, it also appeared for the other projects (C#). One possible cause I had considered was that I'm adding a reference to the Unity-DLLs on the Mac side to the C#-projects so they don't throw errors because they don't find UnityEngine.dll ... but I can't do that for the JavaScript and Boo projects, so that's probably not the issue (unless those projects somehow magically grab those references).


    Another thing I'm noticing: The Unity Project Explorer opens the sub-tree of code files on double click. The Visual Studio explorer doesn't do that (there, the sub tree only opens when I click the little arrow ... most of the time, I really don't want these to open). And when using the dark skin in Visual Studio, when double clicking to open a file, there's a white background ... and white text ;-)

    Here's two screenshots. This is immediately after double clicking "ScoreFlash.cs" ... VSSolutionExplorer is "expected behavior", UnityVSSolutionExplorer is awesome ... but I know that I'll find its current behavior with opening the class navigation annoying (and the "white on white" kind of acceptable but not really awesome ;-) ):

    $VSSolutionExplorer.png $UnityVSSolutionExplorer.png

    Btw, one thing that's also visible on that screenshot: The icons "Visual Studio style sorting" and "Unity style sorting" (awesome feature, btw, I immediately switched to Unity style sorting because I really love it ;-) ): It's a little hard to distinguish from the icons which one is active and which one is not. Actually, I believe there's no visual indication of which one is active at all (at least not when using that "dark skin" that comes with Visual Studio). In the Visual Studio Solution explorer, there's an example of the "standard way" of doing that: The rightmost icon (in that icon row on top of the screenshot) has a blue rectangle around it. That one's "active". It's "preview selected items" an awesome Visual Studio 2012 feature, btw. ;-)

    Let me know if I should file bugs on these issues. For now, I'm just reporting this as "feedback from a brand new user trying to find his way and noticing things". I hope it's helpful feedback.

    I'll check out the TFS-stuff during the next days and keep you posted how that works for me. Now, I actually have to get some work done ;-)

    EDIT: Ah, just noticed that the "white on white" issue actually already is in the bugtracker:
    Selected items in the Unity Project Explorer are unreadable when the window is inactive in VS2012 "dark" theme

    Sorry I missed that (I had a glance at the buglist but went by categories instead of simply showing the full list ;-) ).
     
    Last edited: Feb 2, 2013
  44. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I just filed a crash bug in Visual Studio that I believe to be caused by UnityVS. I'm not absolutely certain this is not a Visual Studio issue (I've just started working with Visual Studio 2012 a few days ago, and installed "Update 1" today, so there's a small chance it's not related to UnityVS).

    Here's the link to the bug report: Visual Studio shows "Object reference not set" popup, can no longer save file, crashes

    Sorry to burden you with that on the weekend ... crash bugs suck ;-) I've uninstalled UnityVS for now, just to be sure this really only happens when I have it installed (no worries, I will re-install later on because I like it ;-) ). It happened about two times within one hour.
     
  45. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Hey,

    Thank you very much for the bug report, we're looking into it. It indeed sounds quite annoying. We had a similar report a few days ago, but so far we've been unable to reproduce it. We're working on it though.

    As for the theming issues, as you can see from our tracker, we did quite a bit of work for the next release, which should work nicely with the dark theme.

    Please don't hesitate to send any issue or suggestion to our support, as not everyone from the team is browsing the Unity forum!

    Thanks again!
     
  46. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Ok, great ... as mentioned in the added comment to that bug report, unfortunately, so far I have no way to reliably reproduce the issue. It just happens very randomly and it seems that without "VS 2012 Update 1", I'm not even getting the error dialog that warns me that this will be happening again.

    Btw, are you looking into performance for larger projects as well? Currently, I have included NGUI and PlayMaker in my project - and that makes Visual Studio almost unusable. Whenever there's a change in the project on the Unity side, Visual Studio either doesn't notice at all - or if it notices (sometimes, I simply re-create the project using the UnityVS inside Unity), it takes probably several minutes until everything is properly reloaded and Visual Studio becomes responsive again. My machine isn't the greatest (2007 Mac Pro) - but in general, Visual Studio works really well on that machine (except for when I install Update 1 ;-) ). A new iMac is on its way, so maybe that issue will eventually resolve itself for me.

    I'll probably file a bug report with some more specific details later on ... as it seems, one main issue seems to be the Unity solution browser. In small projects, it works pretty okay - but when the projects get large, at least on my machine, it takes too long when loading the projects.
     
  47. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I already own this and was wondering if it would be possible to migrate my licence to the asset store version when it ships (or get a refund if i provide an invoice stating i purchased it on the store).
    I really like to manage everything through the asset store
     
  48. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    @jashan, interesting, we never heard of performance issues. Admittedly, I'm not using a 6yo machine either :)

    So you're saying that the Unity Project Explorer takes a while to load on your large project? How large are we talking?
     
  49. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Salut @ronan,

    We're still figuring out how to go to the Asset Store. It's not trivial as UnityVS is not a standalone Unity Package.

    That being said, maybe we could provide the UnityVS side of the package for free on the AssetStore, so that customers that bought it on unityvs.com can install the package from the Asset Store.
     
  50. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    That would really be appreciated, would make it easier to import than browsing for it on each new project! I'd love that.