File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1418,7 +1418,7 @@ void Step (StepDepth depth, StepSize size)
14181418 var req = vm . CreateStepRequest ( current_thread ) ;
14191419 req . Depth = depth ;
14201420 req . Size = size ;
1421- req . Filter = StepFilter . StaticCtor | StepFilter . DebuggerHidden | StepFilter . DebuggerStepThrough ;
1421+ req . Filter = ShouldFilterStaticCtor ( ) | StepFilter . DebuggerHidden | StepFilter . DebuggerStepThrough ;
14221422 if ( Options . ProjectAssembliesOnly )
14231423 req . Filter |= StepFilter . DebuggerNonUserCode ;
14241424 if ( assemblyFilters != null && assemblyFilters . Count > 0 )
@@ -1452,7 +1452,14 @@ void Step (StepDepth depth, StepSize size)
14521452 DebuggerLoggingService . LogError ( "Step request failed" , ex ) ;
14531453 }
14541454 } ) ;
1455- }
1455+ }
1456+
1457+ private StepFilter ShouldFilterStaticCtor ( )
1458+ {
1459+ var frames = current_thread . GetFrames ( ) ;
1460+ return ( frames . Any ( f => f . Method . Name == ".cctor" && f . Method . IsSpecialName && f . Method . IsStatic ) )
1461+ ? StepFilter . None : StepFilter . StaticCtor ;
1462+ }
14561463
14571464 void EventHandler ( )
14581465 {
You can’t perform that action at this time.
0 commit comments