Mixedrealitytoolkit-unity: Breakpoints won't reach on HoloLens Debugging in Visual

Created on 27 Nov 2017  路  7Comments  路  Source: microsoft/MixedRealityToolkit-Unity

Overview

Breakpoints unreachable on any C# scripts when debugging UWP application built from Unity. (Actually HoloLens)

Expected Behavior

Breakpoints should reach.

Actual Behavior

I Have actually the same problem as #1410 .
I completely reinstalled a fresh Windows 10 pro with version 1709 and it doesn't change, breakpoints just won't reach and it worked pretty well before (symbols are loaded for Assembly-CSharp.dll).

I didn't find out anything relevant on internet nor myself about why it fails to break but if it doesn't fail at all to break for you guys i would love to know how!

EDIT: I've noticed that with the new Unity, there is no more Assembly-CSharp-firstpass created on Visual Studio project, wonder if that causes the breakpoints to fail.

Steps to reproduce

Nothing special as far as i'm concerned. Just build a visual project in Unity 2017.2 for HoloLens, open sln and build and deploy and run remotely on Hololens in debug or release mode, and try to break in C# scripts (from MRT for instance). Doesn't work on every PCs I've tested.

Unity Editor Version

2017.2.0f3 (every Unity 2017.2)
Visual Studio 2017
SDK 10.0.16299
Windows 10 Pro v1709

Mixed Reality Toolkit Release Version

2017.2

OS Bug

Most helpful comment

EDIT: The bug is reported on Unity Issue Tracker.
After further investigation, Unity 2017.2 fails to generate a solution that allows to use breakpoints in Visual Studio 2017 on UWP builds.
Further more, we noticed that once you declare a variable inside a function, breakpoints work, but if your function does not start with something like "int i = 0;", breakpoints won't hit.
100% reproducible, hope Unity 2017.3 will fix it.

All 7 comments

I assume the Assembly-CSharp-firstpass is realted to this, see https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/1424

No, I have not any error and everything works fine, just the breakpoints fail to trigger.

EDIT: The bug is reported on Unity Issue Tracker.
After further investigation, Unity 2017.2 fails to generate a solution that allows to use breakpoints in Visual Studio 2017 on UWP builds.
Further more, we noticed that once you declare a variable inside a function, breakpoints work, but if your function does not start with something like "int i = 0;", breakpoints won't hit.
100% reproducible, hope Unity 2017.3 will fix it.

Is this the Unity Issue Tracker entry you were referring to?

https://issuetracker.unity3d.com/issues/uwp-debugger-works-incorrectly-in-certain-scenarios

Good to see it tracked!

Yes it is!

We got the same problem. We added the last version of the Mixed Reality Toolkit (2017.2.0.p1-MRTP4) to our project and for some reason we were not able to debug anymore.

the last day i have been trying out different things and found out the following:

Tools
Visual Studio 2017 version 15.4.5
Unity 2017.2 or Unity 2017.3 beta
.NET SDK 10.0.166299.0
Windows 10 with minimum FCU

Created an Unity project with gameobject, script and some simple code
Build VS solution and did debug (debug, x85, remote machine) to HoloLens
No problems. All breakpoints work

Added the Mixed Reality Toolkit as package to Unity solution
Build VS solution and did debug (debug, x85, remote machine) to HoloLens
None of the breakpoints worked anymore.

Removed from the assets folder both folders regarding Sharing (Sharing and SharingWithUNET)
Build VS solution and did debug (debug, x85, remote machine) to HoloLens
No problems. All breakpoints work

Adding the folders back will cause again problems with breakpoints. I expect that there is something in the folders causing problems with the PDB files generated and code debugging in VS.

Hopefully this could help investigate further the solution

Hit the same issue with 2017.2.1f1, used sharing assets

Was this page helpful?
0 / 5 - 0 ratings