@@ -634,5 +634,33 @@ let testCounter = 0;
634634 debugClient . waitForEvent ( 'terminated' )
635635 ] ) ;
636636 } ) ;
637+ test ( 'Test Hit Count Breakpoints' , async function ( ) {
638+ if ( debuggerType !== 'pythonExperimental' ) {
639+ return this . skip ( ) ;
640+ }
641+
642+ const breakpointLocation = { path : path . join ( debugFilesPath , 'loopyTest.py' ) , column : 1 , line : 2 } ;
643+ const breakpointArgs : DebugProtocol . SetBreakpointsArguments = {
644+ lines : [ breakpointLocation . line ] ,
645+ breakpoints : [ { line : breakpointLocation . line , column : breakpointLocation . column , hitCondition : '5' } ] ,
646+ source : { path : breakpointLocation . path }
647+ } ;
648+ await Promise . all ( [
649+ debugClient . launch ( buildLaunchArgs ( 'loopyTest.py' , false ) ) ,
650+ debugClient . waitForEvent ( 'initialized' )
651+ . then ( ( ) => debugClient . setBreakpointsRequest ( breakpointArgs ) )
652+ . then ( ( ) => debugClient . configurationDoneRequest ( ) )
653+ . then ( ( ) => debugClient . threadsRequest ( ) ) ,
654+ debugClient . waitForEvent ( 'thread' ) ,
655+ debugClient . assertStoppedLocation ( 'breakpoint' , breakpointLocation )
656+ ] ) ;
657+
658+ //Do not remove this, this is required to ensure PTVSD is ready to accept other requests.
659+ await debugClient . threadsRequest ( ) ;
660+ const evaluateResponse = await debugClient . evaluateRequest ( { context : 'repl' , expression : 'i' , frameId : 1 } ) ;
661+ expect ( evaluateResponse . body . type ) . to . equal ( 'int' ) ;
662+ expect ( evaluateResponse . body . result ) . to . equal ( '4' ) ;
663+ await continueDebugging ( debugClient ) ;
664+ } ) ;
637665 } ) ;
638666} ) ;
0 commit comments