Skip to content

Commit a5a1663

Browse files
committed
debug: do not jump when stepping in internal modules
fixes microsoft#2546
1 parent 755d155 commit a5a1663

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/vs/workbench/parts/debug/electron-browser/debugService.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import wbeditorcommon = require('vs/workbench/common/editor');
1919
import debug = require('vs/workbench/parts/debug/common/debug');
2020
import session = require('vs/workbench/parts/debug/node/rawDebugSession');
2121
import model = require('vs/workbench/parts/debug/common/debugModel');
22-
import debuginputs = require('vs/workbench/parts/debug/browser/debugEditorInputs');
22+
import { DebugStringEditorInput } from 'vs/workbench/parts/debug/browser/debugEditorInputs';
2323
import viewmodel = require('vs/workbench/parts/debug/common/debugViewModel');
2424
import debugactions = require('vs/workbench/parts/debug/electron-browser/debugActions');
2525
import { Repl } from 'vs/workbench/parts/debug/browser/repl';
@@ -63,7 +63,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
6363
private model: model.Model;
6464
private viewModel: viewmodel.ViewModel;
6565
private configurationManager: ConfigurationManager;
66-
private debugStringEditorInputs: debuginputs.DebugStringEditorInput[];
66+
private debugStringEditorInputs: DebugStringEditorInput[];
6767
private lastTaskEvent: TaskEvent;
6868
private toDispose: lifecycle.IDisposable[];
6969
private inDebugMode: IKeybindingContextKey<boolean>;
@@ -658,7 +658,9 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
658658
const visibleEditors = this.editorService.getVisibleEditors();
659659
for (let i = 0; i < visibleEditors.length; i++) {
660660
const fileInput = wbeditorcommon.asFileEditorInput(visibleEditors[i].input);
661-
if (fileInput && fileInput.getResource().toString() === source.uri.toString()) {
661+
if ((fileInput && fileInput.getResource().toString() === source.uri.toString()) ||
662+
(visibleEditors[i].input instanceof DebugStringEditorInput && (<DebugStringEditorInput>visibleEditors[i].input).getResource().toString() === source.uri.toString())) {
663+
662664
const control = <editorbrowser.ICodeEditor>visibleEditors[i].getControl();
663665
if (control) {
664666
control.revealLineInCenterIfOutsideViewport(lineNumber);
@@ -742,11 +744,11 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
742744
return this.configurationManager.loadLaunchConfig();
743745
}
744746

745-
private getDebugStringEditorInput(source: Source, value: string, mtype: string): debuginputs.DebugStringEditorInput {
747+
private getDebugStringEditorInput(source: Source, value: string, mtype: string): DebugStringEditorInput {
746748
const filtered = this.debugStringEditorInputs.filter(input => input.getResource().toString() === source.uri.toString());
747749

748750
if (filtered.length === 0) {
749-
const result = this.instantiationService.createInstance(debuginputs.DebugStringEditorInput, source.name, source.uri, source.origin, value, mtype, void 0);
751+
const result = this.instantiationService.createInstance(DebugStringEditorInput, source.name, source.uri, source.origin, value, mtype, void 0);
750752
this.debugStringEditorInputs.push(result);
751753
return result;
752754
} else {

0 commit comments

Comments
 (0)