public Task <SetExceptionBreakpointsResponse> Handle(SetExceptionBreakpointsArguments request, CancellationToken cancellationToken) { // TODO: When support for exception breakpoints (unhandled and/or first chance) // are added to the PowerShell engine, wire up the VSCode exception // breakpoints here using the pattern below to prevent bug regressions. //if (!noDebug) //{ // setBreakpointInProgress = true; // try // { // // Set exception breakpoints in DebugService // } // catch (Exception e) // { // // Log whatever the error is // Logger.WriteException($"Caught error while setting exception breakpoints", e); // } // finally // { // setBreakpointInProgress = false; // } //} return(Task.FromResult(new SetExceptionBreakpointsResponse())); }
protected override SetExceptionBreakpointsResponse HandleSetExceptionBreakpointsRequest(SetExceptionBreakpointsArguments arguments) { return(new SetExceptionBreakpointsResponse()); }
protected override SetExceptionBreakpointsResponse HandleSetExceptionBreakpointsRequest(SetExceptionBreakpointsArguments arguments) { return(this.ExceptionManager.HandleSetExceptionBreakpointsRequest(arguments)); }
protected override SetExceptionBreakpointsResponse HandleSetExceptionBreakpointsRequest(SetExceptionBreakpointsArguments arguments) { throw new ProtocolException("Not Implemented"); }
protected override SetExceptionBreakpointsResponse HandleSetExceptionBreakpointsRequest(SetExceptionBreakpointsArguments arguments) { try { if (session == null) { throw new InvalidOperationException(); } session.SetExceptionBreakpoints(arguments.Filters); return(new SetExceptionBreakpointsResponse()); } catch (Exception ex) { Log(ex.Message, LogCategory.DebugAdapterOutput); throw new ProtocolException(ex.Message, ex); } }
internal SetExceptionBreakpointsResponse HandleSetExceptionBreakpointsRequest(SetExceptionBreakpointsArguments arguments) { //We assume that we'll only receive exception breakpoints in categories that interest us this.exceptionCategorySettings.Clear(); if (arguments.ExceptionOptions != null) { foreach (ExceptionOptions options in arguments.ExceptionOptions) { // We assume all ExceptionPathSegments will reference a single category string category = options.Path?.FirstOrDefault()?.Names?.FirstOrDefault(); if (String.IsNullOrEmpty(category)) { continue; } ExceptionCategorySettings settings = null; if (!this.exceptionCategorySettings.TryGetValue(category, out settings)) { settings = new ExceptionCategorySettings(category); this.exceptionCategorySettings.Add(category, settings); } ExceptionPathSegment exceptions = options.Path.Skip(1).FirstOrDefault(); if (exceptions != null) { // Set break mode for individual exceptions foreach (string exception in exceptions.Names) { settings.SetExceptionBreakMode(exception, options.BreakMode); } } else { // No path segments beyond the category - set the break mode for the category settings.CategoryBreakMode = options.BreakMode; } } } return(new SetExceptionBreakpointsResponse()); }