Skip to content

Commit b03d23d

Browse files
committed
1 parent 1c7510c commit b03d23d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/vs/workbench/contrib/debug/browser/debugEditorActions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)