//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public override async Task <bool> CanLaunchAsync(DebugLaunchOptions launchOptions) { LoggingUtils.PrintFunction(); IDebugLauncher debugLauncher = null; try { debugLauncher = GetDebugLauncher(ServiceProvider); return(await System.Threading.Tasks.Task.Run(() => { try { return debugLauncher.CanLaunch((int)launchOptions); } catch (Exception e) { HandleExceptionDialog(e, debugLauncher); } return false; })); } catch (Exception e) { HandleExceptionDialog(e, debugLauncher); } return(false); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public override bool CanLaunch(DebugLaunchOptions launchOptions) { LoggingUtils.PrintFunction(); IDebugLauncher debugLauncher = null; try { debugLauncher = GetDebugLauncher(ServiceProvider); return(debugLauncher.CanLaunch((int)launchOptions)); } catch (Exception e) { LoggingUtils.HandleException(e); string description = string.Format("'CanLaunch' failed:\n[Exception]{0}", e.Message); #if DEBUG description += "\n[Exception] Stack trace:\n" + e.StackTrace; #endif if (debugLauncher != null) { LoggingUtils.RequireOk(debugLauncher.GetConnectionService().LaunchDialogUpdate(description, true)); } VsShellUtilities.ShowMessageBox(ServiceProvider, description, "Android++ Debugger", OLEMSGICON.OLEMSGICON_CRITICAL, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST); } return(false); }