// In use through XAML binding private async void TextEditor_TextChanged(object sender, System.EventArgs e) { var textEditor = sender as TextEditor; var trace = textEditor.Document?.Text; if (string.IsNullOrEmpty(trace)) { return; } textEditor.TextChanged -= TextEditor_TextChanged; ViewModel.SetStackTrace(trace); textEditor.TextChanged += TextEditor_TextChanged; var workspace = EnvDteHelper.ComponentModel.GetService <VisualStudioWorkspace>(); SolutionHelper.Solution = workspace.CurrentSolution; await SolutionHelper.GetCompilationsAsync(workspace.CurrentSolution); }