Home Dashboard Directory Help

VS Tools for Unity - Watchlist Woes by StygianTraveler


Status: 

Closed
 as External Help for as External


1
0
Sign in
to vote
Type: Bug
ID: 953379
Opened: 8/23/2014 1:49:09 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

I'm having an annoying issue with the watch list while debugging a Unity project using VSTU, it basically won't let me watch something outside the local scope, from what I can tell. For instance, I can watch the various properties of "this" fine, but if I try to add, say, "Input.mousePosition" to the watch list, it goes " Could not find a member `mousePosition` for `` ". That seems weird? Likewise for watching method return values, it can't seem to find the correct method. A very simple example, trying to watch "Mathf.Abs(1)" results in "Failed to find a match for Abs(System.Char[])". What? Why a Char array...?

I'm not quite sure if this is a bug or a limitation of VSTU, but I've heard of other people having this problem so I don't think it's just on my side... hopefully it can be fixed because this makes debugging a pain.
Details
Sign in to post a comment.
Posted by Microsoft on 9/3/2014 at 1:33 AM
Yes, in fact it was other bugfixes in the upcoming 1.9.1.
We will try to release it as fast as possible.

Regards.
Posted by StygianTraveler on 9/1/2014 at 2:44 PM
Hmm, on my side, I get this:

Vector3.zero    Could not find a member `zero` for ``    System.String

Mathf.Abs(56f)    Failed to find a match for Abs(System.Char[])    System.String

Any idea why this is happening?
Posted by Microsoft on 8/28/2014 at 7:51 AM
Hi,

We fixed the issue rearding Mathf.Abs(x). You should try to use the "f" C# numeric suffix as a workaround like Mathf.Abs(56f)
Vector3.zero works fine on our side.

Other issues are on the Unity3D side, and regarding debugger backend (that's why it does not work either with MonoDevelop)
- Generic method call using the watch is not yet possible (like GetComponent<Camera>())
- method call with string argument using the watch does not work properly (we sent bug reports to Unity3D QA)

Regards,
Sebastien
Posted by StygianTraveler on 8/27/2014 at 8:04 PM
Well, I attached a project but... I don't think watch items are saved in the solution right? Maybe breakpoints are. Anyway, it's pretty much just an empty project with one tiny MonoBehavior. Just add a breakpoint in the if statement in Test.cs if there isn't one, then run the game in Unity, attach the debugger, and press space in the Unity Editor's game view to hit the breakpoint.

Now, if you add local variables/members (like, say, "x", or "transform.position") to the watch list, it works fine.

But for instance if you add any of the following, it fails:
CompareTag("MainCamera")
GetComponent<Camera>()
Vector3.zero
Mathf.Abs(x)

So it seems like you can't watch the return value of methods, or members of other classes, which is really not practical. Now, hopefully you get the same result, but I guess it's possible that there's something wrong in my setup that's causing this...? I know of at least two other people who have noticed similar behavior with the watch list though, so it seems it's probably a bug or a limitation of Visual Studio Tools for Unity. Hopefully it can be improved.

Thanks.
Posted by Microsoft on 8/25/2014 at 1:06 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project to demonstrate this issue so that we can conduct further research?

Please submit this information to us within 4 business days. We look forward to hearing from you with this information. If you require immediate assistance with this issue, please contact product support at http://support.microsoft.com/ph/1117.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 8/23/2014 at 3:17 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
WatchlistDemo.zip 8/27/2014 1.61 MB