Line numbers in stack trace for UWP applications

In Visual Studio 2015, I created an empty Universal Windows App project.

I am adding something like:

try {
    string foo = null;
    int len = foo.Length;
} catch (Exception ex) {
    System.Diagnostics.Debug.WriteLine(ex);
}

I get a stack trace like:

Exception thrown: 'System.NullReferenceException' in TestStackTraces.exe
System.NullReferenceException: Object reference not set to an instance of an object.
at TestStackTraces.App.OnLaunched(LaunchActivatedEventArgs e)

ie, No line numbers.

How to get line numbers to display?

+4
source share
1 answer

This is no longer supported. I am rewriting my answer here because when I was looking for my answer on another question, it was very difficult to find it in the search results. Hope this question helps people find this information more easily.

Help: exceptions from window 10 that do not contain line numbers

Additional Information:

. corefx # 1420 corefx # 1797.

SO: StackTrace Windows Universal 10

+2

All Articles