File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/debug/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -268,10 +268,10 @@ class StepIntoTargetsAction extends EditorAction {
268268 const session = debugService . getViewModel ( ) . focusedSession ;
269269 const frame = debugService . getViewModel ( ) . focusedStackFrame ;
270270
271- if ( session && frame && editor . hasModel ( ) ) {
271+ if ( session && frame && editor . hasModel ( ) && editor . getModel ( ) . uri . toString ( ) === frame . source . uri . toString ( ) ) {
272272 const targets = await session . stepInTargets ( frame . frameId ) ;
273- const position = editor . getPosition ( ) ;
274- const cursorCoords = editor . getScrolledVisiblePosition ( position ) ;
273+ editor . revealLineInCenterIfOutsideViewport ( frame . range . startLineNumber ) ;
274+ const cursorCoords = editor . getScrolledVisiblePosition ( { lineNumber : frame . range . startLineNumber , column : frame . range . startColumn } ) ;
275275 const editorCoords = getDomNodePagePosition ( editor . getDomNode ( ) ) ;
276276 const x = editorCoords . left + cursorCoords . left ;
277277 const y = editorCoords . top + cursorCoords . top + cursorCoords . height ;
You can’t perform that action at this time.
0 commit comments