locked
Problems with debugging Windows 8 Store apps

    Question

  • We' re about to publish our first Windows 8 app in the Store and during development we came across various problems with debugging in Visual Studio 2013. This seems to work less good than in regular C# applications and despite some searching I have not been able to solve the problems. Maybe someone has a direct idea:

    1 When I start with F5, VS starts with "Loading symbols for  ... from Microsoft symbol servers". This takes a lot of time, was introduced when I was trying to change some debugging sessions but I haven't got rid of it. Even if it is needed (is it?) it would be very practical if the dialog gets focus so you know at least why your app doesn't continue for a while. But I'd prefer to get rid of this. How?

    2 Run time errors (exceptions) do not go to a usable debug situations:

    a) When running without debugging, the program stops doing anything (in my app: I see an empty flipview where it should show pictures, so the first thing I think is that there's something wrong with my data(binding) while actually there's some problem somewhere. Or the app simply restarts...

    b) When running with debugging, and stepping through the lines, on the offending line,  the program switches to App.g.i.cs and stops in this code:

    #if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
                UnhandledException += (sender, e) =>
                {
                    if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
                };
    #endif

    A debugger is attacted to xxx but not configured to debug this unhandled exception. To debug, detach the current debugger.

    Then I get a window where I can select from New instance of Microsoft Visual Studio 2012, New instance of Microsoft Visual Studio 2013 or a totally different solution in which I am not even working! Why on earth would I want to use VS 2012 to debug my current project in VS 2013? Needless to say, none of these suggestions work. Why don't I continue in the debugger I started my program with in the first place? And I haven't received a clue about what went wrong....

    Is there anything I can set or improve or do differently or do I have to get used to this poor debugging options in Windows 8 Store apps?

    Dick

    Friday, August 29, 2014 3:56 PM

Answers

  • These issues can be addressed by simple settings change, first under DEBUG>>OPTIONS & SETTINGS>>SYMBOLS do this

    Then under DEBUG >> EXCEPTIONS do this


    -- Vishal Kaushik --

    Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you. Happy Coding!!!

    • Marked as answer by Dick (English) Monday, September 01, 2014 10:03 AM
    Friday, August 29, 2014 5:00 PM

All replies

  • These issues can be addressed by simple settings change, first under DEBUG>>OPTIONS & SETTINGS>>SYMBOLS do this

    Then under DEBUG >> EXCEPTIONS do this


    -- Vishal Kaushik --

    Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you. Happy Coding!!!

    • Marked as answer by Dick (English) Monday, September 01, 2014 10:03 AM
    Friday, August 29, 2014 5:00 PM
  • +

    All data binding issues can be seen in output log for debug

    But there is a catch, if DataContext itself is null (not assigned) then binding errors are not shown.


    -- Vishal Kaushik --

    Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you. Happy Coding!!!

    Friday, August 29, 2014 5:00 PM
  • Thank you Vishal, that seems to do the trick. I thought I unchecked that first setting earlier, no idea why at that moment it didn't seem to help. The second I didn't know; I hope this will help a lot with debugging.

    Monday, September 01, 2014 10:05 AM
  • I guess from your reply seeing no clue (there or elsewhere) when Databinding doesn't work may have to do something with a DataContext problem. I'll check that out and post a follow up later; thanks for the suggestions!
    Monday, September 01, 2014 10:07 AM