Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Remote Debugging a Debug Build

Has anyone had any luck doing remote debugging with a debug build in Visual Studio (of a Unity project) with the debug build setting? I'm running into trouble with a script and need to debug, but the debug build fails to deploy. I can run debugging on the release build but because of the optimizations of a release build, break points don't function properly. For example, in release build it breaks at the first line of a function but none of the break points directly below trigger, nor can I step through. Without a debug build debugging it's quite a challenge.

Answers

  • Options

    @Jarrod1937 I have been able to step through my code in Visual Studio when deploying a Debug build and clicking Start Debugging.

    I do recall a situation where a project had a very large model and running in Debug didn't behave, but generally I have had success with other projects.

    The most common problem that I keep bumping into is if the device sleep or gets turned off while Visual Studio is still open. I can't count the number of times that has caused me sudden panic after a streak of successful deploys until grey memory gives way to muscle memory.

    One thing that you might try is unchecking "Enable Just My Code" in Visual Studio.

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • Options
    Jarrod1937Jarrod1937 ✭✭✭

    Good to hear it is possible, I'll mess around with it later myself this evening. Though, I believe I figured out my issue without it.
    And yes, I hope they fix the deployment issues when the unit goes to sleep or is restarted.
    Thanks for the help.

  • Options
    Jarrod1937Jarrod1937 ✭✭✭
    edited June 2016

    Got it to work... apparently need more sleep.

  • Options
    Jarrod1937Jarrod1937 ✭✭✭
    edited June 2016

    Ok, while I can now deploy debugging, however, as soon as it starts, it then exits and the Hololens says it lost tracking and needs to rescan the environment. Any idea how I can get it to progress further? I'm finding it quite difficult to get some more complicated things working without debug capability.

    Edit: to give more detail, it seems to freeze, go back to the desktop, and say it needs to rescan. I am running the surface observer, and the mesh to planes processing at the beginning.

  • Options

    @Jarrod1937 as will all types of apps, there will be some things (processes) that don't lend themselves to being interrupted.

    Maybe a cousin of that old problem "observation changes outcome" dilemma :smile:

    However, for those kinds of scenarios Debug.log is your friend. It requires a little more typing and experimenting but it tends to be more useful when you need to check values where interrupting the state breaks the flow.

    Debug.log should write to your Immediate or Output window (depending on your settings) in Visual studio and like break points should also work with Remote Debugging.

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • Options
    Jarrod1937Jarrod1937 ✭✭✭
    edited June 2016

    @HoloSheep, You're saying the debug.log output should write to visual studio when debugging in release mode? That would help a lot, though I don't see such output, any particular settings required for that?
    Though, the issue I see, is that even the break points don't function properly in release mode. Most of the time they do, other times, it will break on the first line of a function, but not anything below that, I assume this is because of the discrepancy between the debugging and the optimizations done in release mode compiling.

Sign In or Register to comment.