File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,17 +235,23 @@ public void Kill()
235235
236236 public void SetExceptionsBreakpoints ( ( string Id , string Condition ) [ ] filters )
237237 {
238- if ( ProtocolVersion > ProtocolVersions . Version1 && ProtocolVersion < ProtocolVersions . Version3 )
238+ switch ( ProtocolVersion )
239239 {
240- _debugger . SetMachineExceptionBreakpoints ( filters ) ;
241- }
242- else if ( ProtocolVersion >= ProtocolVersions . Version3 )
243- {
244- _debugger . SetExceptionBreakpoints ( filters . Select ( t => new ExceptionBreakpointFilter
245- {
246- Id = t . Id ,
247- Condition = t . Condition
248- } ) . ToArray ( ) ) ;
240+ case ProtocolVersions . UnknownVersion :
241+ case ProtocolVersions . Version1 :
242+ // Version 1 doesn't support exception breakpoints
243+ Log . Warning ( "Exception breakpoints not supported in protocol version {Version}" , ProtocolVersion ) ;
244+ break ;
245+ case ProtocolVersions . Version2 :
246+ _debugger . SetMachineExceptionBreakpoints ( filters ) ;
247+ break ;
248+ default : // Version 3 and higher
249+ _debugger . SetExceptionBreakpoints ( filters . Select ( t => new ExceptionBreakpointFilter
250+ {
251+ Id = t . Id ,
252+ Condition = t . Condition
253+ } ) . ToArray ( ) ) ;
254+ break ;
249255 }
250256 }
251257
You can’t perform that action at this time.
0 commit comments