Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
In our application we invoke to the UI thread in various places.
In order to make the debugging/profiling experience better we would like to see the debug call stack past the Device.BeginInvokeOnMainThread() call. For this we want to use the following kludge when profiling and debugging:
static public async Task InvokeOnMainThreadWithCallstackAsync(Func<Task> action)
if (SynchronizationContext.Current == null)
Task t = null;
var tcs = new TaskCompletionSource<object>();
Func<Task> x = async () =>
t = x.Invoke();
while (t == null)
; //await Task.Delay(1);
CrossPlatform.Assert(t.Status == TaskStatus.WaitingForActivation);
However, when breaking the VS debugger inside the action, the callstack does not go up to TestInvokeOnMainThreadAsync() as it should. Since we are awaiting t, I would expect the callstack to extend back to the caller of TestInvokeOnMainThreadAsync().
> I would expect the callstack to extend back to the caller
> of TestInvokeOnMainThreadAsync().
What callback do you see instead?
Would it be possible for you to create a small test case to demonstrate the behavior?
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!