@@ -39,17 +39,26 @@ export function activate(context: vscode.ExtensionContext) {
3939rtlDebugger . session ! . runSimulation ( ) ;
4040}
4141} ) ) ;
42- context . subscriptions . push ( vscode . commands . registerCommand ( 'rtlDebugger.runSimulationUntil' , ( ) => {
43- inputTime ( { prompt :'Enter the requested simulation time.' } ) . then ( ( untilTime ) => {
44- if ( untilTime !== undefined ) {
45- rtlDebugger . session ! . runSimulation ( { untilTime} ) ;
46- }
47- } ) ;
42+ context . subscriptions . push ( vscode . commands . registerCommand ( 'rtlDebugger.runSimulationUntil' , async ( ) => {
43+ const untilTime = await inputTime ( { prompt :'Enter the time to simulate until.' } ) ;
44+ if ( untilTime !== undefined ) {
45+ rtlDebugger . session ! . runSimulation ( { untilTime} ) ;
46+ }
4847} ) ) ;
4948context . subscriptions . push ( vscode . commands . registerCommand ( 'rtlDebugger.stepBackward' , ( ) =>
5049rtlDebugger . session ! . stepBackward ( ) ) ) ;
5150context . subscriptions . push ( vscode . commands . registerCommand ( 'rtlDebugger.stepForward' , ( ) =>
5251rtlDebugger . session ! . stepForward ( ) ) ) ;
52+ context . subscriptions . push ( vscode . commands . registerCommand ( 'rtlDebugger.goToTime' , async ( ) => {
53+ const goToTime = await inputTime ( { prompt :'Enter the time to examine the state at.' } ) ;
54+ if ( goToTime !== undefined ) {
55+ if ( rtlDebugger . session ! . simulationStatus . latestTime . lessThan ( goToTime ) ) {
56+ vscode . window . showErrorMessage ( `The simulation has not advanced to${ goToTime } yet.` ) ;
57+ } else {
58+ rtlDebugger . session ! . timeCursor = goToTime ;
59+ }
60+ }
61+ } ) ) ;
5362
5463context . subscriptions . push ( vscode . commands . registerCommand ( 'rtlDebugger.setRadix.2' , ( treeItem ) =>
5564globalVariableOptions . update ( treeItem . designation . variable . cxxrtlIdentifier , { radix :2 } ) ) ) ;