Release build does not include file name/line number in exception stack traces

phanqui 1 Reputation point
2022-04-08T08:30:03.95+00:00

Hi all!

I build my application in debug mode and get full file name and line number
but when I build in release mode, it's just show the symbol
Is there anyway I can get full file name and line number like debug mode?

Here is my stacktrace when I build in debug mode:

at System.Net.Http.MonoWebRequestHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x004ac] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/System.Net.Http/MonoWebRequestHandler.cs:507
at System.Net.Http.HttpClient.FinishSendAsyncBuffered (System.Threading.Tasks.Task`1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) [0x0017e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpClient.cs:506
at ....EX.ExchangeAdapter.GetRoomList (....groupware.data.Account account, System.String searchKey, ....Constants+STORAGE_TYPE storageTypeToUser, System.Threading.CancellationTokenSource tokenSource) [0x0050e] in /Users/..../.../.../source/.../ExchangeAdapter.cs:128

Here is my stacktrace when I build in release mode:

at System.Net.Http.MonoWebRequestHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x004f6] in <735826cfbac54cb097cd902ec98d942f>:0
at System.Net.Http.HttpClient.FinishSendAsyncBuffered (System.Threading.Tasks.Task`1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) [0x0017e] in <735826cfbac54cb097cd902ec98d942f>:0
at ....EX.ExchangeAdapter.GetRoomList (....groupware.data.Account account, System.String searchKey, ....Constants+STORAGE_TYPE storageTypeToUser, System.Threading.CancellationTokenSource tokenSource) [0x003fa] in <10ede0c4bf654b0888423fe1a6961d21>:0

Thanks!

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,315 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 38,061 Reputation points Microsoft Vendor
    2022-04-11T01:15:15.553+00:00

    Hello,

    You need to symbolize the "native" Android crash report via using the symbols of the release build.

    You can refer to this documentation: xamarin.android_7.4 and search mono-symbolicate to get the specific practices.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments