Debugging Loads Wrong Files/Lines - Inconsistent With Stack Trace

Occasionally I will be stepping through functions in Visual Studio's debugger to diagnose a thrown exception. The execution path that the debugger takes me through is not consistent with the stack trace that is displayed in the Output window.

I've omitted namespaces and file paths. Here is my stack trace:

10-20 14:25:40.050 E/mono (10560): Unhandled Exception: 10-20 14:25:40.050 E/mono (10560): System.NullReferenceException: Object reference not set to an instance of an object 10-20 14:25:40.050 E/mono (10560): at *****.SendRequest[GetJobsResponse] (RestSharp.RestRequest request, Newtonsoft.Json.Linq.JObject json, System.String& responseContent) [0x00018] in *****\JobRestClient.cs:42 10-20 14:25:40.050 E/mono (10560): at *****.SendRequest[GetJobsResponse] (RestSharp.RestRequest request, Newtonsoft.Json.Linq.JObject json) [0x00001] in *****\JobRestClient.cs:17 10-20 14:25:40.050 E/mono (10560): at *****.GetJobs () [0x00000] in <filename unknown>:0 10-20 14:25:40.050 E/mono (10560): at *****.RefreshJobsData () [0x0001d] in *****\JobsDataDirector.cs 10-20 14:25:40.050 E/mono-rt (10560): [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object 10-20 14:25:40.050 E/mono-rt (10560): at *****.SendRequest[GetJobsResponse] (RestSharp.RestRequest request, Newtonsoft.Json.Linq.JObject json, System.String& responseContent) [0x00018] in *****\JobRestClient.cs:42 10-20 14:25:40.050 E/mono-rt (10560): at *****.SendRequest[GetJobsResponse] (RestSharp.RestRequest request, Newtonsoft.Json.Linq.JObject json) [0x00001] in *****\JobRestClient.cs:17 10-20 14:25:40.050 E/mono-rt (10560): at *****.GetJobs () [0x00000] in <filename unknown>:0 10-20 14:25:40.050 E/mono-rt (10560): at *****.RefreshJobsData () [0x0001d] in *****\JobsDataDirector.cs The program 'Mono' has exited with code 0 (0x0).

The stack trace is accurate, but I am unable to step through the stack because the debugger loads files and brings me to lines in code that are not related to the stack trace at all.

Here are my Xamarin versions (Latest as of 10/22/2014):

Xamarin   3.7.230.0 (e78d10d6993f95fc3ebe791aeb4aacff165bf8bb)
Xamarin.Android   4.18.0.39 (0ef616ae42005ece52f6df7aa1e093ceb11998f8)

Any thoughts on why this is happening? Is the debugger is not resolving the correct symbols?

Thanks for reading.

Bill

Sign In or Register to comment.