Merge from vscode 073a24de05773f2261f89172987002dc0ae2f1cd (#9711)

This commit is contained in:
Anthony Dresser
2020-03-24 00:24:15 -07:00
committed by GitHub
parent 29741d684e
commit 89ef1b0c2e
226 changed files with 6161 additions and 3288 deletions

View File

@@ -95,13 +95,15 @@ const VIEW_CONTAINER: ViewContainer = Registry.as<IViewContainersRegistry>(ViewE
focusCommand: {
id: OpenDebugPanelAction.ID,
keybindings: openPanelKb
}
},
hideIfEmpty: true
}, ViewContainerLocation.Panel);
Registry.as<IViewsRegistry>(ViewExtensions.ViewsRegistry).registerViews([{
id: REPL_VIEW_ID,
name: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugPanel' }, 'Debug Console'),
canToggleVisibility: false,
canMoveView: true,
ctorDescriptor: new SyncDescriptor(Repl),
}], VIEW_CONTAINER);
@@ -180,6 +182,7 @@ registerDebugCommandPaletteItem(TOGGLE_INLINE_BREAKPOINT_ID, nls.localize('inlin
Registry.as<IQuickAccessRegistry>(QuickAccessExtensions.Quickaccess).registerQuickAccessProvider({
ctor: StartDebugQuickAccessProvider,
prefix: StartDebugQuickAccessProvider.PREFIX,
contextKey: 'inLaunchConfigurationsPicker',
placeholder: nls.localize('startDebugPlaceholder', "Type the name of a launch configuration to run."),
helpEntries: [{ description: nls.localize('startDebugHelp', "Start Debug Configurations"), needsEditor: false }]
});

View File

@@ -760,8 +760,9 @@ export class DebugService implements IDebugService {
const control = editor.getControl();
if (stackFrame && isCodeEditor(control) && control.hasModel()) {
const model = control.getModel();
if (stackFrame.range.startLineNumber <= model.getLineCount()) {
const lineContent = control.getModel().getLineContent(stackFrame.range.startLineNumber);
const lineNumber = stackFrame.range.startLineNumber;
if (lineNumber >= 1 && lineNumber <= model.getLineCount()) {
const lineContent = control.getModel().getLineContent(lineNumber);
aria.alert(nls.localize('debuggingPaused', "Debugging paused {0}, {1} {2} {3}", thread && thread.stoppedDetails ? `, reason ${thread.stoppedDetails.reason}` : '', stackFrame.source ? stackFrame.source.name : '', stackFrame.range.startLineNumber, lineContent));
}
}

View File

@@ -50,7 +50,6 @@ import { ITextResourcePropertiesService } from 'vs/editor/common/services/textRe
import { RunOnceScheduler } from 'vs/base/common/async';
import { FuzzyScore } from 'vs/base/common/filters';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { PANEL_BACKGROUND } from 'vs/workbench/common/theme';
import { ReplDelegate, ReplVariablesRenderer, ReplSimpleElementsRenderer, ReplEvaluationInputsRenderer, ReplEvaluationResultsRenderer, ReplRawObjectsRenderer, ReplDataSource, ReplAccessibilityProvider, ReplGroupRenderer } from 'vs/workbench/contrib/debug/browser/replViewer';
import { localize } from 'vs/nls';
import { ViewPane, IViewPaneOptions } from 'vs/workbench/browser/parts/views/viewPaneContainer';
@@ -495,7 +494,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
setRowLineHeight: false,
supportDynamicHeights: wordWrap,
overrideStyles: {
listBackground: PANEL_BACKGROUND
listBackground: this.getBackgroundColor()
}
});
this._register(this.tree.onContextMenu(e => this.onContextMenu(e)));

View File

@@ -128,10 +128,12 @@ function stringToUri(source: PathContainer): string | undefined {
function uriToString(source: PathContainer): string | undefined {
if (typeof source.path === 'object') {
const u = uri.revive(source.path);
if (u.scheme === 'file') {
return u.fsPath;
} else {
return u.toString();
if (u) {
if (u.scheme === 'file') {
return u.fsPath;
} else {
return u.toString();
}
}
}
return source.path;