Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c (#8525)
* Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c * remove files we don't want * fix hygiene * update distro * update distro * fix hygiene * fix strict nulls * distro * distro * fix tests * fix tests * add another edit * fix viewlet icon * fix azure dialog * fix some padding * fix more padding issues
@@ -17,6 +17,7 @@ import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { HighlightedLabel, IHighlight } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
||||
import { FuzzyScore, createMatches } from 'vs/base/common/filters';
|
||||
import { LinkDetector } from 'vs/workbench/contrib/debug/browser/linkDetector';
|
||||
import { ReplEvaluationResult } from 'vs/workbench/contrib/debug/common/replModel';
|
||||
|
||||
export const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024;
|
||||
export const twistiePixels = 20;
|
||||
@@ -58,7 +59,7 @@ export function renderExpressionValue(expressionOrValue: IExpressionContainer |
|
||||
// remove stale classes
|
||||
container.className = 'value';
|
||||
// when resolving expressions we represent errors from the server as a variable with name === null.
|
||||
if (value === null || ((expressionOrValue instanceof Expression || expressionOrValue instanceof Variable) && !expressionOrValue.available)) {
|
||||
if (value === null || ((expressionOrValue instanceof Expression || expressionOrValue instanceof Variable || expressionOrValue instanceof ReplEvaluationResult) && !expressionOrValue.available)) {
|
||||
dom.addClass(container, 'unavailable');
|
||||
if (value !== Expression.DEFAULT_VALUE) {
|
||||
dom.addClass(container, 'error');
|
||||
|
||||
@@ -32,6 +32,8 @@ import { distinct } from 'vs/base/common/arrays';
|
||||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
import { EditorOption } from 'vs/editor/common/config/editorOptions';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { BrowserFeatures } from 'vs/base/browser/canIUse';
|
||||
import { isSafari } from 'vs/base/browser/browser';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
@@ -43,7 +45,7 @@ interface IBreakpointDecoration {
|
||||
}
|
||||
|
||||
const breakpointHelperDecoration: IModelDecorationOptions = {
|
||||
glyphMarginClassName: 'debug-breakpoint-hint',
|
||||
glyphMarginClassName: 'codicon-debug-hint',
|
||||
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges
|
||||
};
|
||||
|
||||
@@ -91,7 +93,7 @@ function getBreakpointDecorationOptions(model: ITextModel, breakpoint: IBreakpoi
|
||||
}
|
||||
|
||||
return {
|
||||
glyphMarginClassName: className,
|
||||
glyphMarginClassName: `${className}`,
|
||||
glyphMarginHoverMessage,
|
||||
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
|
||||
beforeContentClassName: breakpoint.column ? `debug-breakpoint-placeholder` : undefined,
|
||||
@@ -105,25 +107,29 @@ async function createCandidateDecorations(model: ITextModel, breakpointDecoratio
|
||||
const session = debugService.getViewModel().focusedSession;
|
||||
if (session && session.capabilities.supportsBreakpointLocationsRequest) {
|
||||
await Promise.all(lineNumbers.map(async lineNumber => {
|
||||
const positions = await session.breakpointsLocations(model.uri, lineNumber);
|
||||
if (positions.length > 1) {
|
||||
// Do not render candidates if there is only one, since it is already covered by the line breakpoint
|
||||
positions.forEach(p => {
|
||||
const range = new Range(p.lineNumber, p.column, p.lineNumber, p.column + 1);
|
||||
const breakpointAtPosition = breakpointDecorations.filter(bpd => bpd.range.equalsRange(range)).pop();
|
||||
if (breakpointAtPosition && breakpointAtPosition.inlineWidget) {
|
||||
// Space already occupied, do not render candidate.
|
||||
return;
|
||||
}
|
||||
result.push({
|
||||
range,
|
||||
options: {
|
||||
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
|
||||
beforeContentClassName: `debug-breakpoint-placeholder`
|
||||
},
|
||||
breakpoint: breakpointAtPosition ? breakpointAtPosition.breakpoint : undefined
|
||||
try {
|
||||
const positions = await session.breakpointsLocations(model.uri, lineNumber);
|
||||
if (positions.length > 1) {
|
||||
// Do not render candidates if there is only one, since it is already covered by the line breakpoint
|
||||
positions.forEach(p => {
|
||||
const range = new Range(p.lineNumber, p.column, p.lineNumber, p.column + 1);
|
||||
const breakpointAtPosition = breakpointDecorations.filter(bpd => bpd.range.equalsRange(range)).pop();
|
||||
if (breakpointAtPosition && breakpointAtPosition.inlineWidget) {
|
||||
// Space already occupied, do not render candidate.
|
||||
return;
|
||||
}
|
||||
result.push({
|
||||
range,
|
||||
options: {
|
||||
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
|
||||
beforeContentClassName: `debug-breakpoint-placeholder`
|
||||
},
|
||||
breakpoint: breakpointAtPosition ? breakpointAtPosition.breakpoint : undefined
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
// If there is an error when fetching breakpoint locations just do not render them
|
||||
}
|
||||
}));
|
||||
}
|
||||
@@ -131,7 +137,6 @@ async function createCandidateDecorations(model: ITextModel, breakpointDecoratio
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
||||
|
||||
private breakpointHintDecoration: string[] = [];
|
||||
@@ -227,34 +232,48 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
||||
}
|
||||
}));
|
||||
|
||||
this.toDispose.push(this.editor.onMouseMove((e: IEditorMouseEvent) => {
|
||||
let showBreakpointHintAtLineNumber = -1;
|
||||
const model = this.editor.getModel();
|
||||
if (model && e.target.position && (e.target.type === MouseTargetType.GUTTER_GLYPH_MARGIN || e.target.type === MouseTargetType.GUTTER_LINE_NUMBERS) && this.debugService.getConfigurationManager().canSetBreakpointsIn(model) &&
|
||||
this.marginFreeFromNonDebugDecorations(e.target.position.lineNumber)) {
|
||||
const data = e.target.detail as IMarginData;
|
||||
if (!data.isAfterLines) {
|
||||
showBreakpointHintAtLineNumber = e.target.position.lineNumber;
|
||||
if (!(BrowserFeatures.pointerEvents && isSafari)) {
|
||||
/**
|
||||
* We disable the hover feature for Safari on iOS as
|
||||
* 1. Browser hover events are handled specially by the system (it treats first click as hover if there is `:hover` css registered). Below hover behavior will confuse users with inconsistent expeirence.
|
||||
* 2. When users click on line numbers, the breakpoint hint displays immediately, however it doesn't create the breakpoint unless users click on the left gutter. On a touch screen, it's hard to click on that small area.
|
||||
*/
|
||||
this.toDispose.push(this.editor.onMouseMove((e: IEditorMouseEvent) => {
|
||||
let showBreakpointHintAtLineNumber = -1;
|
||||
const model = this.editor.getModel();
|
||||
if (model && e.target.position && (e.target.type === MouseTargetType.GUTTER_GLYPH_MARGIN || e.target.type === MouseTargetType.GUTTER_LINE_NUMBERS) && this.debugService.getConfigurationManager().canSetBreakpointsIn(model) &&
|
||||
this.marginFreeFromNonDebugDecorations(e.target.position.lineNumber)) {
|
||||
const data = e.target.detail as IMarginData;
|
||||
if (!data.isAfterLines) {
|
||||
showBreakpointHintAtLineNumber = e.target.position.lineNumber;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.ensureBreakpointHintDecoration(showBreakpointHintAtLineNumber);
|
||||
}));
|
||||
this.toDispose.push(this.editor.onMouseLeave((e: IEditorMouseEvent) => {
|
||||
this.ensureBreakpointHintDecoration(-1);
|
||||
}));
|
||||
this.ensureBreakpointHintDecoration(showBreakpointHintAtLineNumber);
|
||||
}));
|
||||
this.toDispose.push(this.editor.onMouseLeave(() => {
|
||||
this.ensureBreakpointHintDecoration(-1);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
this.toDispose.push(this.editor.onDidChangeModel(async () => {
|
||||
this.closeBreakpointWidget();
|
||||
await this.setDecorations();
|
||||
}));
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(async () => {
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(() => {
|
||||
if (!this.ignoreBreakpointsChangeEvent && !this.setDecorationsScheduler.isScheduled()) {
|
||||
this.setDecorationsScheduler.schedule();
|
||||
}
|
||||
}));
|
||||
this.toDispose.push(this.debugService.onDidChangeState(() => {
|
||||
// We need to update breakpoint decorations when state changes since the top stack frame and breakpoint decoration might change
|
||||
if (!this.setDecorationsScheduler.isScheduled()) {
|
||||
this.setDecorationsScheduler.schedule();
|
||||
}
|
||||
}));
|
||||
this.toDispose.push(this.editor.onDidChangeModelDecorations(() => this.onModelDecorationsChanged()));
|
||||
this.toDispose.push(this.configurationService.onDidChangeConfiguration(async (e) => {
|
||||
if (e.affectsConfiguration('debug.showBreakpointsInOverviewRuler')) {
|
||||
if (e.affectsConfiguration('debug.showBreakpointsInOverviewRuler') || e.affectsConfiguration('debug.showInlineBreakpointCandidates')) {
|
||||
await this.setDecorations();
|
||||
}
|
||||
}));
|
||||
@@ -338,7 +357,7 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
||||
const decorations = this.editor.getLineDecorations(line);
|
||||
if (decorations) {
|
||||
for (const { options } of decorations) {
|
||||
if (options.glyphMarginClassName && options.glyphMarginClassName.indexOf('debug') === -1) {
|
||||
if (options.glyphMarginClassName && options.glyphMarginClassName.indexOf('codicon-') === -1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -406,7 +425,7 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
||||
}
|
||||
|
||||
// Set breakpoint candidate decorations
|
||||
const desiredCandidateDecorations = await createCandidateDecorations(this.editor.getModel(), this.breakpointDecorations, this.debugService);
|
||||
const desiredCandidateDecorations = debugSettings.showInlineBreakpointCandidates ? await createCandidateDecorations(this.editor.getModel(), this.breakpointDecorations, this.debugService) : [];
|
||||
const candidateDecorationIds = this.editor.deltaDecorations(this.candidateDecorations.map(c => c.decorationId), desiredCandidateDecorations);
|
||||
this.candidateDecorations.forEach(candidate => {
|
||||
candidate.inlineWidget.dispose();
|
||||
@@ -416,7 +435,7 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
||||
// Candidate decoration has a breakpoint attached when a breakpoint is already at that location and we did not yet set a decoration there
|
||||
// In practice this happens for the first breakpoint that was set on a line
|
||||
// We could have also rendered this first decoration as part of desiredBreakpointDecorations however at that moment we have no location information
|
||||
const cssClass = candidate.breakpoint ? getBreakpointMessageAndClassName(this.debugService, candidate.breakpoint).className : 'debug-breakpoint-disabled';
|
||||
const cssClass = candidate.breakpoint ? getBreakpointMessageAndClassName(this.debugService, candidate.breakpoint).className : 'codicon-debug-breakpoint-disabled';
|
||||
const contextMenuActions = () => this.getContextMenuActions(candidate.breakpoint ? [candidate.breakpoint] : [], activeCodeEditor.getModel().uri, candidate.range.startLineNumber, candidate.range.startColumn);
|
||||
const inlineWidget = new InlineBreakpointWidget(activeCodeEditor, decorationId, cssClass, candidate.breakpoint, this.debugService, this.contextMenuService, contextMenuActions);
|
||||
|
||||
@@ -537,6 +556,7 @@ class InlineBreakpointWidget implements IContentWidget, IDisposable {
|
||||
|
||||
private create(cssClass: string | null | undefined): void {
|
||||
this.domNode = $('.inline-breakpoint-widget');
|
||||
this.domNode.classList.add('codicon');
|
||||
if (cssClass) {
|
||||
this.domNode.classList.add(cssClass);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@ import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegis
|
||||
import { getSimpleEditorOptions, getSimpleCodeEditorWidgetOptions } from 'vs/workbench/contrib/codeEditor/browser/simpleEditorOptions';
|
||||
import { IRange, Range } from 'vs/editor/common/core/range';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IEditorOptions, EditorOption } from 'vs/editor/common/config/editorOptions';
|
||||
|
||||
const $ = dom.$;
|
||||
const IPrivateBreakpointWidgetService = createDecorator<IPrivateBreakpointWidgetService>('privateBreakpointWidgetService');
|
||||
@@ -48,6 +50,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private selectContainer!: HTMLElement;
|
||||
private inputContainer!: HTMLElement;
|
||||
private input!: IActiveCodeEditor;
|
||||
private toDispose: lifecycle.IDisposable[];
|
||||
private conditionInput = '';
|
||||
@@ -55,6 +58,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
|
||||
private logMessageInput = '';
|
||||
private breakpoint: IBreakpoint | undefined;
|
||||
private context: Context;
|
||||
private heightInPx: number | undefined;
|
||||
|
||||
constructor(editor: ICodeEditor, private lineNumber: number, private column: number | undefined, context: Context | undefined,
|
||||
@IContextViewService private readonly contextViewService: IContextViewService,
|
||||
@@ -64,6 +68,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IModelService private readonly modelService: IModelService,
|
||||
@ICodeEditorService private readonly codeEditorService: ICodeEditorService,
|
||||
@IConfigurationService private readonly _configurationService: IConfigurationService
|
||||
) {
|
||||
super(editor, { showFrame: true, showArrow: false, frameWidth: 1 });
|
||||
|
||||
@@ -158,7 +163,8 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
|
||||
this.input.focus();
|
||||
});
|
||||
|
||||
this.createBreakpointInput(dom.append(container, $('.inputContainer')));
|
||||
this.inputContainer = $('.inputContainer');
|
||||
this.createBreakpointInput(dom.append(container, this.inputContainer));
|
||||
|
||||
this.input.getModel().setValue(this.getInputValue(this.breakpoint));
|
||||
this.toDispose.push(this.input.getModel().onDidChangeContent(() => {
|
||||
@@ -170,7 +176,9 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
|
||||
}
|
||||
|
||||
protected _doLayout(heightInPixel: number, widthInPixel: number): void {
|
||||
this.heightInPx = heightInPixel;
|
||||
this.input.layout({ height: heightInPixel, width: widthInPixel - 113 });
|
||||
this.centerInputVertically();
|
||||
}
|
||||
|
||||
private createBreakpointInput(container: HTMLElement): void {
|
||||
@@ -180,7 +188,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
|
||||
const scopedInstatiationService = this.instantiationService.createChild(new ServiceCollection(
|
||||
[IContextKeyService, scopedContextKeyService], [IPrivateBreakpointWidgetService, this]));
|
||||
|
||||
const options = getSimpleEditorOptions();
|
||||
const options = this.createEditorOptions();
|
||||
const codeEditorWidgetOptions = getSimpleCodeEditorWidgetOptions();
|
||||
this.input = <IActiveCodeEditor>scopedInstatiationService.createInstance(CodeEditorWidget, container, options, codeEditorWidgetOptions);
|
||||
CONTEXT_IN_BREAKPOINT_WIDGET.bindTo(scopedContextKeyService).set(true);
|
||||
@@ -227,6 +235,29 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
|
||||
return suggestionsPromise;
|
||||
}
|
||||
}));
|
||||
|
||||
this.toDispose.push(this._configurationService.onDidChangeConfiguration((e) => {
|
||||
if (e.affectsConfiguration('editor.fontSize') || e.affectsConfiguration('editor.lineHeight')) {
|
||||
this.input.updateOptions(this.createEditorOptions());
|
||||
this.centerInputVertically();
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
private createEditorOptions(): IEditorOptions {
|
||||
const editorConfig = this._configurationService.getValue<IEditorOptions>('editor');
|
||||
const options = getSimpleEditorOptions();
|
||||
options.fontSize = editorConfig.fontSize;
|
||||
return options;
|
||||
}
|
||||
|
||||
private centerInputVertically() {
|
||||
if (this.container && typeof this.heightInPx === 'number') {
|
||||
const lineHeight = this.input.getOption(EditorOption.lineHeight);
|
||||
const lineNum = this.input.getModel().getLineCount();
|
||||
const newTopMargin = (this.heightInPx - lineNum * lineHeight) / 2;
|
||||
this.inputContainer.style.marginTop = newTopMargin + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
private createDecorations(): IDecorationOptions[] {
|
||||
|
||||
@@ -28,9 +28,11 @@ import { attachInputBoxStyler } from 'vs/platform/theme/common/styler';
|
||||
import { isCodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/views/panelViewlet';
|
||||
import { ViewletPane, IViewletPaneOptions } from 'vs/workbench/browser/parts/views/paneViewlet';
|
||||
import { ILabelService } from 'vs/platform/label/common/label';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { Gesture } from 'vs/base/browser/touch';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
@@ -38,11 +40,12 @@ function createCheckbox(): HTMLInputElement {
|
||||
const checkbox = <HTMLInputElement>$('input');
|
||||
checkbox.type = 'checkbox';
|
||||
checkbox.tabIndex = -1;
|
||||
Gesture.ignoreTarget(checkbox);
|
||||
|
||||
return checkbox;
|
||||
}
|
||||
|
||||
export class BreakpointsView extends ViewletPanel {
|
||||
export class BreakpointsView extends ViewletPane {
|
||||
|
||||
private static readonly MAX_VISIBLE_FILES = 9;
|
||||
private list!: WorkbenchList<IEnablement>;
|
||||
@@ -60,7 +63,7 @@ export class BreakpointsView extends ViewletPanel {
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
) {
|
||||
super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
super({ ...(options as IViewletPaneOptions), ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
|
||||
this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize();
|
||||
this._register(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange()));
|
||||
@@ -85,6 +88,9 @@ export class BreakpointsView extends ViewletPanel {
|
||||
getPosInSet: (_: IEnablement, index: number) => index,
|
||||
getRole: (breakpoint: IEnablement) => 'checkbox',
|
||||
isChecked: (breakpoint: IEnablement) => breakpoint.enabled
|
||||
},
|
||||
overrideStyles: {
|
||||
listBackground: SIDE_BAR_BACKGROUND
|
||||
}
|
||||
});
|
||||
|
||||
@@ -346,7 +352,7 @@ class BreakpointsRenderer implements IListRenderer<IBreakpoint, IBreakpointTempl
|
||||
data.checkbox.checked = breakpoint.enabled;
|
||||
|
||||
const { message, className } = getBreakpointMessageAndClassName(this.debugService, breakpoint);
|
||||
data.icon.className = className + ' icon';
|
||||
data.icon.className = `codicon ${className}`;
|
||||
data.breakpoint.title = breakpoint.message || message || '';
|
||||
|
||||
const debugActive = this.debugService.state === State.Running || this.debugService.state === State.Stopped;
|
||||
@@ -441,7 +447,7 @@ class FunctionBreakpointsRenderer implements IListRenderer<FunctionBreakpoint, I
|
||||
data.context = functionBreakpoint;
|
||||
data.name.textContent = functionBreakpoint.name;
|
||||
const { className, message } = getBreakpointMessageAndClassName(this.debugService, functionBreakpoint);
|
||||
data.icon.className = className + ' icon';
|
||||
data.icon.className = `codicon ${className}`;
|
||||
data.icon.title = message ? message : '';
|
||||
data.checkbox.checked = functionBreakpoint.enabled;
|
||||
data.breakpoint.title = message ? message : '';
|
||||
@@ -496,7 +502,7 @@ class DataBreakpointsRenderer implements IListRenderer<DataBreakpoint, IBaseBrea
|
||||
data.context = dataBreakpoint;
|
||||
data.name.textContent = dataBreakpoint.label;
|
||||
const { className, message } = getBreakpointMessageAndClassName(this.debugService, dataBreakpoint);
|
||||
data.icon.className = className + ' icon';
|
||||
data.icon.className = `codicon ${className}`;
|
||||
data.icon.title = message ? message : '';
|
||||
data.checkbox.checked = dataBreakpoint.enabled;
|
||||
data.breakpoint.title = message ? message : '';
|
||||
@@ -587,7 +593,7 @@ class FunctionBreakpointInputRenderer implements IListRenderer<IFunctionBreakpoi
|
||||
data.reactedOnEvent = false;
|
||||
const { className, message } = getBreakpointMessageAndClassName(this.debugService, functionBreakpoint);
|
||||
|
||||
data.icon.className = className + ' icon';
|
||||
data.icon.className = `codicon ${className}`;
|
||||
data.icon.title = message ? message : '';
|
||||
data.checkbox.checked = functionBreakpoint.enabled;
|
||||
data.checkbox.disabled = true;
|
||||
@@ -638,7 +644,7 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
|
||||
|
||||
if (!breakpoint.enabled || !debugService.getModel().areBreakpointsActivated()) {
|
||||
return {
|
||||
className: breakpoint instanceof DataBreakpoint ? 'debug-data-breakpoint-disabled' : breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-disabled' : breakpoint.logMessage ? 'debug-breakpoint-log-disabled' : 'debug-breakpoint-disabled',
|
||||
className: breakpoint instanceof DataBreakpoint ? 'codicon-debug-breakpoint-data-disabled' : breakpoint instanceof FunctionBreakpoint ? 'codicon-debug-breakpoint-function-disabled' : breakpoint.logMessage ? 'codicon-debug-breakpoint-log-disabled' : 'codicon-debug-breakpoint-disabled',
|
||||
message: breakpoint.logMessage ? nls.localize('disabledLogpoint', "Disabled Logpoint") : nls.localize('disabledBreakpoint', "Disabled Breakpoint"),
|
||||
};
|
||||
}
|
||||
@@ -648,7 +654,7 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
|
||||
};
|
||||
if (debugActive && !breakpoint.verified) {
|
||||
return {
|
||||
className: breakpoint instanceof DataBreakpoint ? 'debug-data-breakpoint-unverified' : breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-unverified' : breakpoint.logMessage ? 'debug-breakpoint-log-unverified' : 'debug-breakpoint-unverified',
|
||||
className: breakpoint instanceof DataBreakpoint ? 'codicon-debug-breakpoint-data-unverified' : breakpoint instanceof FunctionBreakpoint ? 'codicon-debug-breakpoint-function-unverified' : breakpoint.logMessage ? 'codicon-debug-breakpoint-log-unverified' : 'codicon-debug-breakpoint-unverified',
|
||||
message: breakpoint.message || (breakpoint.logMessage ? nls.localize('unverifiedLogpoint', "Unverified Logpoint") : nls.localize('unverifiedBreakopint', "Unverified Breakpoint")),
|
||||
};
|
||||
}
|
||||
@@ -656,13 +662,13 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
|
||||
if (breakpoint instanceof FunctionBreakpoint) {
|
||||
if (!breakpoint.supported) {
|
||||
return {
|
||||
className: 'debug-function-breakpoint-unverified',
|
||||
className: 'codicon-debug-breakpoint-function-unverified',
|
||||
message: nls.localize('functionBreakpointUnsupported', "Function breakpoints not supported by this debug type"),
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
className: 'debug-function-breakpoint',
|
||||
className: 'codicon-debug-breakpoint-function',
|
||||
message: breakpoint.message || nls.localize('functionBreakpoint', "Function Breakpoint")
|
||||
};
|
||||
}
|
||||
@@ -670,13 +676,13 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
|
||||
if (breakpoint instanceof DataBreakpoint) {
|
||||
if (!breakpoint.supported) {
|
||||
return {
|
||||
className: 'debug-data-breakpoint-unverified',
|
||||
className: 'codicon-debug-breakpoint-data-unverified',
|
||||
message: nls.localize('dataBreakpointUnsupported', "Data breakpoints not supported by this debug type"),
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
className: 'debug-data-breakpoint',
|
||||
className: 'codicon-debug-breakpoint-data',
|
||||
message: breakpoint.message || nls.localize('dataBreakpoint', "Data Breakpoint")
|
||||
};
|
||||
}
|
||||
@@ -686,7 +692,7 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
|
||||
|
||||
if (!breakpoint.supported) {
|
||||
return {
|
||||
className: 'debug-breakpoint-unsupported',
|
||||
className: 'codicon-debug-breakpoint-unsupported',
|
||||
message: nls.localize('breakpointUnsupported', "Breakpoints of this type are not supported by the debugger"),
|
||||
};
|
||||
}
|
||||
@@ -702,13 +708,32 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
|
||||
}
|
||||
|
||||
return {
|
||||
className: breakpoint.logMessage ? 'debug-breakpoint-log' : 'debug-breakpoint-conditional',
|
||||
className: breakpoint.logMessage ? 'codicon-debug-breakpoint-log' : 'codicon-debug-breakpoint-conditional',
|
||||
message: appendMessage(messages.join('\n'))
|
||||
};
|
||||
}
|
||||
|
||||
const focusedThread = debugService.getViewModel().focusedThread;
|
||||
if (focusedThread) {
|
||||
const callStack = focusedThread ? focusedThread.getCallStack() : undefined;
|
||||
const topStackFrame = callStack ? callStack[0] : undefined;
|
||||
if (topStackFrame && topStackFrame.source.uri.toString() === breakpoint.uri.toString() && topStackFrame.range.startLineNumber === breakpoint.lineNumber) {
|
||||
if (topStackFrame.range.startColumn === breakpoint.column) {
|
||||
return {
|
||||
className: 'codicon-debug-breakpoint-stackframe-dot',
|
||||
message: breakpoint.message || nls.localize('breakpoint', "Breakpoint")
|
||||
};
|
||||
} else if (breakpoint.column === undefined) {
|
||||
return {
|
||||
className: 'codicon-debug-breakpoint',
|
||||
message: breakpoint.message || nls.localize('breakpoint', "Breakpoint")
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
className: 'debug-breakpoint',
|
||||
className: 'codicon-debug-breakpoint',
|
||||
message: breakpoint.message || nls.localize('breakpoint', "Breakpoint")
|
||||
};
|
||||
}
|
||||
|
||||
@@ -18,14 +18,13 @@ import { IAction, Action } from 'vs/base/common/actions';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IViewletPanelOptions, ViewletPanel } from 'vs/workbench/browser/parts/views/panelViewlet';
|
||||
import { IViewletPaneOptions, ViewletPane } from 'vs/workbench/browser/parts/views/paneViewlet';
|
||||
import { ILabelService } from 'vs/platform/label/common/label';
|
||||
import { IAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { createAndFillInContextMenuActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
|
||||
import { ITreeRenderer, ITreeNode, ITreeContextMenuEvent, IAsyncDataSource } from 'vs/base/browser/ui/tree/tree';
|
||||
import { TreeResourceNavigator2, WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
||||
import { createMatches, FuzzyScore } from 'vs/base/common/filters';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
@@ -35,12 +34,26 @@ import { isSessionAttach } from 'vs/workbench/contrib/debug/common/debugUtils';
|
||||
import { STOP_ID, STOP_LABEL, DISCONNECT_ID, DISCONNECT_LABEL, RESTART_SESSION_ID, RESTART_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STEP_INTO_LABEL, STEP_INTO_ID, STEP_OUT_LABEL, STEP_OUT_ID, PAUSE_ID, PAUSE_LABEL, CONTINUE_ID, CONTINUE_LABEL } from 'vs/workbench/contrib/debug/browser/debugCommands';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { CollapseAction } from 'vs/workbench/browser/viewlet';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
type CallStackItem = IStackFrame | IThread | IDebugSession | string | ThreadAndSessionIds | IStackFrame[];
|
||||
|
||||
export class CallStackView extends ViewletPanel {
|
||||
function getContext(element: CallStackItem | null): any {
|
||||
return element instanceof StackFrame ? {
|
||||
sessionId: element.thread.session.getId(),
|
||||
threadId: element.thread.getId(),
|
||||
frameId: element.getId()
|
||||
} : element instanceof Thread ? {
|
||||
sessionId: element.session.getId(),
|
||||
threadId: element.getId()
|
||||
} : isDebugSession(element) ? {
|
||||
sessionId: element.getId()
|
||||
} : undefined;
|
||||
}
|
||||
|
||||
export class CallStackView extends ViewletPane {
|
||||
|
||||
private pauseMessage!: HTMLSpanElement;
|
||||
private pauseMessageLabel!: HTMLSpanElement;
|
||||
@@ -66,7 +79,7 @@ export class CallStackView extends ViewletPanel {
|
||||
@IMenuService menuService: IMenuService,
|
||||
@IContextKeyService readonly contextKeyService: IContextKeyService,
|
||||
) {
|
||||
super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
super({ ...(options as IViewletPaneOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
this.callStackItemType = CONTEXT_CALLSTACK_ITEM_TYPE.bindTo(contextKeyService);
|
||||
|
||||
this.contributedContextMenu = menuService.createMenu(MenuId.DebugCallStackContext, contextKeyService);
|
||||
@@ -90,7 +103,7 @@ export class CallStackView extends ViewletPanel {
|
||||
} else {
|
||||
this.pauseMessage.hidden = true;
|
||||
if (this.toolbar) {
|
||||
const collapseAction = new CollapseAction(this.tree, true, 'explorer-action collapse-explorer');
|
||||
const collapseAction = new CollapseAction(this.tree, true, 'explorer-action codicon-collapse-all');
|
||||
this.toolbar.setActions([collapseAction])();
|
||||
}
|
||||
}
|
||||
@@ -122,7 +135,7 @@ export class CallStackView extends ViewletPanel {
|
||||
const treeContainer = renderViewTree(container);
|
||||
|
||||
this.dataSource = new CallStackDataSource(this.debugService);
|
||||
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'CallStackView', treeContainer, new CallStackDelegate(), [
|
||||
this.tree = this.instantiationService.createInstance<typeof WorkbenchAsyncDataTree, WorkbenchAsyncDataTree<CallStackItem | IDebugModel, CallStackItem, FuzzyScore>>(WorkbenchAsyncDataTree, 'CallStackView', treeContainer, new CallStackDelegate(), [
|
||||
new SessionsRenderer(this.instantiationService),
|
||||
new ThreadsRenderer(this.instantiationService),
|
||||
this.instantiationService.createInstance(StackFramesRenderer),
|
||||
@@ -162,10 +175,13 @@ export class CallStackView extends ViewletPanel {
|
||||
return nls.localize('showMoreStackFrames2', "Show More Stack Frames");
|
||||
}
|
||||
},
|
||||
expandOnlyOnTwistieClick: true
|
||||
expandOnlyOnTwistieClick: true,
|
||||
overrideStyles: {
|
||||
listBackground: SIDE_BAR_BACKGROUND
|
||||
}
|
||||
});
|
||||
|
||||
this.tree.setInput(this.debugService.getModel()).then(undefined, onUnexpectedError);
|
||||
this.tree.setInput(this.debugService.getModel());
|
||||
|
||||
const callstackNavigator = new TreeResourceNavigator2(this.tree);
|
||||
this._register(callstackNavigator);
|
||||
@@ -326,15 +342,15 @@ export class CallStackView extends ViewletPanel {
|
||||
this.contextMenuService.showContextMenu({
|
||||
getAnchor: () => e.anchor,
|
||||
getActions: () => actions,
|
||||
getActionsContext: () => element && element instanceof StackFrame ? element.getId() : undefined,
|
||||
getActionsContext: () => getContext(element),
|
||||
onHide: () => dispose(actionsDisposable)
|
||||
});
|
||||
}
|
||||
|
||||
private getContextForContributedActions(element: CallStackItem | null): string | number | undefined {
|
||||
private getContextForContributedActions(element: CallStackItem | null): string | number {
|
||||
if (element instanceof StackFrame) {
|
||||
if (element.source.inMemory) {
|
||||
return element.source.raw.path || element.source.reference;
|
||||
return element.source.raw.path || element.source.reference || '';
|
||||
}
|
||||
|
||||
return element.source.uri.toString();
|
||||
@@ -346,7 +362,7 @@ export class CallStackView extends ViewletPanel {
|
||||
return element.getId();
|
||||
}
|
||||
|
||||
return undefined;
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,6 +398,7 @@ interface IStackFrameTemplateData {
|
||||
fileName: HTMLElement;
|
||||
lineNumber: HTMLElement;
|
||||
label: HighlightedLabel;
|
||||
actionBar: ActionBar;
|
||||
}
|
||||
|
||||
class SessionsRenderer implements ITreeRenderer<IDebugSession, FuzzyScore, ISessionTemplateData> {
|
||||
@@ -478,8 +495,9 @@ class StackFramesRenderer implements ITreeRenderer<IStackFrame, FuzzyScore, ISta
|
||||
const wrapper = dom.append(file, $('span.line-number-wrapper'));
|
||||
const lineNumber = dom.append(wrapper, $('span.line-number'));
|
||||
const label = new HighlightedLabel(labelDiv, false);
|
||||
const actionBar = new ActionBar(stackFrame);
|
||||
|
||||
return { file, fileName, label, lineNumber, stackFrame };
|
||||
return { file, fileName, label, lineNumber, stackFrame, actionBar };
|
||||
}
|
||||
|
||||
renderElement(element: ITreeNode<IStackFrame, FuzzyScore>, index: number, data: IStackFrameTemplateData): void {
|
||||
@@ -487,6 +505,8 @@ class StackFramesRenderer implements ITreeRenderer<IStackFrame, FuzzyScore, ISta
|
||||
dom.toggleClass(data.stackFrame, 'disabled', !stackFrame.source || !stackFrame.source.available || isDeemphasized(stackFrame));
|
||||
dom.toggleClass(data.stackFrame, 'label', stackFrame.presentationHint === 'label');
|
||||
dom.toggleClass(data.stackFrame, 'subtle', stackFrame.presentationHint === 'subtle');
|
||||
const hasActions = stackFrame.thread.session.capabilities.supportsRestartFrame;
|
||||
dom.toggleClass(data.stackFrame, 'has-actions', hasActions);
|
||||
|
||||
data.file.title = stackFrame.source.inMemory ? stackFrame.source.uri.path : this.labelService.getUriLabel(stackFrame.source.uri);
|
||||
if (stackFrame.source.raw.origin) {
|
||||
@@ -503,10 +523,18 @@ class StackFramesRenderer implements ITreeRenderer<IStackFrame, FuzzyScore, ISta
|
||||
} else {
|
||||
dom.addClass(data.lineNumber, 'unavailable');
|
||||
}
|
||||
|
||||
data.actionBar.clear();
|
||||
if (hasActions) {
|
||||
const action = new Action('debug.callStack.restartFrame', nls.localize('restartFrame', "Restart Frame"), 'codicon-debug-restart-frame', true, () => {
|
||||
return stackFrame.restart();
|
||||
});
|
||||
data.actionBar.push(action, { icon: true, label: false });
|
||||
}
|
||||
}
|
||||
|
||||
disposeTemplate(templateData: IStackFrameTemplateData): void {
|
||||
// noop
|
||||
templateData.actionBar.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -644,7 +672,7 @@ class CallStackDataSource implements IAsyncDataSource<IDebugModel, CallStackItem
|
||||
if (sessions.length === 0) {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
if (sessions.length > 1) {
|
||||
if (sessions.length > 1 || this.debugService.getViewModel().isMultiSessionView()) {
|
||||
return Promise.resolve(sessions.filter(s => !s.parentSession));
|
||||
}
|
||||
|
||||
@@ -786,11 +814,11 @@ class StopAction extends Action {
|
||||
private readonly session: IDebugSession,
|
||||
@ICommandService private readonly commandService: ICommandService
|
||||
) {
|
||||
super(`action.${STOP_ID}`, STOP_LABEL, 'debug-action stop');
|
||||
super(`action.${STOP_ID}`, STOP_LABEL, 'debug-action codicon-debug-stop');
|
||||
}
|
||||
|
||||
public run(): Promise<any> {
|
||||
return this.commandService.executeCommand(STOP_ID, this.session.getId(), this.session);
|
||||
return this.commandService.executeCommand(STOP_ID, getContext(this.session));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -800,11 +828,11 @@ class DisconnectAction extends Action {
|
||||
private readonly session: IDebugSession,
|
||||
@ICommandService private readonly commandService: ICommandService
|
||||
) {
|
||||
super(`action.${DISCONNECT_ID}`, DISCONNECT_LABEL, 'debug-action disconnect');
|
||||
super(`action.${DISCONNECT_ID}`, DISCONNECT_LABEL, 'debug-action codicon-debug-disconnect');
|
||||
}
|
||||
|
||||
public run(): Promise<any> {
|
||||
return this.commandService.executeCommand(DISCONNECT_ID, this.session.getId(), this.session);
|
||||
return this.commandService.executeCommand(DISCONNECT_ID, getContext(this.session));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -814,11 +842,11 @@ class RestartAction extends Action {
|
||||
private readonly session: IDebugSession,
|
||||
@ICommandService private readonly commandService: ICommandService
|
||||
) {
|
||||
super(`action.${RESTART_SESSION_ID}`, RESTART_LABEL, 'debug-action restart');
|
||||
super(`action.${RESTART_SESSION_ID}`, RESTART_LABEL, 'debug-action codicon-debug-restart');
|
||||
}
|
||||
|
||||
public run(): Promise<any> {
|
||||
return this.commandService.executeCommand(RESTART_SESSION_ID, this.session.getId(), this.session);
|
||||
return this.commandService.executeCommand(RESTART_SESSION_ID, getContext(this.session));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -828,11 +856,11 @@ class StepOverAction extends Action {
|
||||
private readonly thread: IThread,
|
||||
@ICommandService private readonly commandService: ICommandService
|
||||
) {
|
||||
super(`action.${STEP_OVER_ID}`, STEP_OVER_LABEL, 'debug-action step-over', thread.stopped);
|
||||
super(`action.${STEP_OVER_ID}`, STEP_OVER_LABEL, 'debug-action codicon-debug-step-over', thread.stopped);
|
||||
}
|
||||
|
||||
public run(): Promise<any> {
|
||||
return this.commandService.executeCommand(STEP_OVER_ID, this.thread.threadId, this.thread);
|
||||
return this.commandService.executeCommand(STEP_OVER_ID, getContext(this.thread));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -842,11 +870,11 @@ class StepIntoAction extends Action {
|
||||
private readonly thread: IThread,
|
||||
@ICommandService private readonly commandService: ICommandService
|
||||
) {
|
||||
super(`action.${STEP_INTO_ID}`, STEP_INTO_LABEL, 'debug-action step-into', thread.stopped);
|
||||
super(`action.${STEP_INTO_ID}`, STEP_INTO_LABEL, 'debug-action codicon-debug-step-into', thread.stopped);
|
||||
}
|
||||
|
||||
public run(): Promise<any> {
|
||||
return this.commandService.executeCommand(STEP_INTO_ID, this.thread.threadId, this.thread);
|
||||
return this.commandService.executeCommand(STEP_INTO_ID, getContext(this.thread));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -856,11 +884,11 @@ class StepOutAction extends Action {
|
||||
private readonly thread: IThread,
|
||||
@ICommandService private readonly commandService: ICommandService
|
||||
) {
|
||||
super(`action.${STEP_OUT_ID}`, STEP_OUT_LABEL, 'debug-action step-out', thread.stopped);
|
||||
super(`action.${STEP_OUT_ID}`, STEP_OUT_LABEL, 'debug-action codicon-debug-step-out', thread.stopped);
|
||||
}
|
||||
|
||||
public run(): Promise<any> {
|
||||
return this.commandService.executeCommand(STEP_OUT_ID, this.thread.threadId, this.thread);
|
||||
return this.commandService.executeCommand(STEP_OUT_ID, getContext(this.thread));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -870,11 +898,11 @@ class PauseAction extends Action {
|
||||
private readonly thread: IThread,
|
||||
@ICommandService private readonly commandService: ICommandService
|
||||
) {
|
||||
super(`action.${PAUSE_ID}`, PAUSE_LABEL, 'debug-action pause', !thread.stopped);
|
||||
super(`action.${PAUSE_ID}`, PAUSE_LABEL, 'debug-action codicon-debug-pause', !thread.stopped);
|
||||
}
|
||||
|
||||
public run(): Promise<any> {
|
||||
return this.commandService.executeCommand(PAUSE_ID, this.thread.threadId, this.thread);
|
||||
return this.commandService.executeCommand(PAUSE_ID, getContext(this.thread));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -884,10 +912,10 @@ class ContinueAction extends Action {
|
||||
private readonly thread: IThread,
|
||||
@ICommandService private readonly commandService: ICommandService
|
||||
) {
|
||||
super(`action.${CONTINUE_ID}`, CONTINUE_LABEL, 'debug-action continue', thread.stopped);
|
||||
super(`action.${CONTINUE_ID}`, CONTINUE_LABEL, 'debug-action codicon-debug-continue', thread.stopped);
|
||||
}
|
||||
|
||||
public run(): Promise<any> {
|
||||
return this.commandService.executeCommand(CONTINUE_ID, this.thread.threadId, this.thread);
|
||||
return this.commandService.executeCommand(CONTINUE_ID, getContext(this.thread));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import { CallStackView } from 'vs/workbench/contrib/debug/browser/callStackView'
|
||||
import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions';
|
||||
import {
|
||||
IDebugService, VIEWLET_ID, REPL_ID, CONTEXT_IN_DEBUG_MODE, INTERNAL_CONSOLE_OPTIONS_SCHEMA,
|
||||
CONTEXT_DEBUG_STATE, VARIABLES_VIEW_ID, CALLSTACK_VIEW_ID, WATCH_VIEW_ID, BREAKPOINTS_VIEW_ID, VIEW_CONTAINER, LOADED_SCRIPTS_VIEW_ID, CONTEXT_LOADED_SCRIPTS_SUPPORTED, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_RESTART_FRAME_SUPPORTED, CONTEXT_JUMP_TO_CURSOR_SUPPORTED,
|
||||
CONTEXT_DEBUG_STATE, VARIABLES_VIEW_ID, CALLSTACK_VIEW_ID, WATCH_VIEW_ID, BREAKPOINTS_VIEW_ID, VIEW_CONTAINER, LOADED_SCRIPTS_VIEW_ID, CONTEXT_LOADED_SCRIPTS_SUPPORTED, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_RESTART_FRAME_SUPPORTED, CONTEXT_JUMP_TO_CURSOR_SUPPORTED, CONTEXT_DEBUG_UX,
|
||||
} from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
|
||||
@@ -47,8 +47,9 @@ import { WatchExpressionsView } from 'vs/workbench/contrib/debug/browser/watchEx
|
||||
import { VariablesView } from 'vs/workbench/contrib/debug/browser/variablesView';
|
||||
import { ClearReplAction, Repl } from 'vs/workbench/contrib/debug/browser/repl';
|
||||
import { DebugContentProvider } from 'vs/workbench/contrib/debug/common/debugContentProvider';
|
||||
import { registerAndGetAmdImageURL } from 'vs/base/common/amd';
|
||||
import { DebugCallStackContribution } from 'vs/workbench/contrib/debug/browser/debugCallStackContribution';
|
||||
import { StartView } from 'vs/workbench/contrib/debug/browser/startView';
|
||||
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
|
||||
|
||||
class OpenDebugViewletAction extends ShowViewletAction {
|
||||
public static readonly ID = VIEWLET_ID;
|
||||
@@ -80,13 +81,12 @@ class OpenDebugPanelAction extends TogglePanelAction {
|
||||
}
|
||||
|
||||
// register viewlet
|
||||
Registry.as<ViewletRegistry>(ViewletExtensions.Viewlets).registerViewlet(new ViewletDescriptor(
|
||||
Registry.as<ViewletRegistry>(ViewletExtensions.Viewlets).registerViewlet(ViewletDescriptor.create(
|
||||
DebugViewlet,
|
||||
VIEWLET_ID,
|
||||
nls.localize('debug', "Debug"),
|
||||
'debug',
|
||||
// {{SQL CARBON EDIT}}
|
||||
13
|
||||
nls.localize('debugAndRun', "Debug And Run"),
|
||||
'codicon-debug',
|
||||
13 // {{SQL CARBON EDIT}}
|
||||
));
|
||||
|
||||
const openViewletKb: IKeybindings = {
|
||||
@@ -97,7 +97,7 @@ const openPanelKb: IKeybindings = {
|
||||
};
|
||||
|
||||
// register repl panel
|
||||
Registry.as<PanelRegistry>(PanelExtensions.Panels).registerPanel(new PanelDescriptor(
|
||||
Registry.as<PanelRegistry>(PanelExtensions.Panels).registerPanel(PanelDescriptor.create(
|
||||
Repl,
|
||||
REPL_ID,
|
||||
nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugPanel' }, 'Debug Console'),
|
||||
@@ -108,18 +108,19 @@ Registry.as<PanelRegistry>(PanelExtensions.Panels).registerPanel(new PanelDescri
|
||||
|
||||
// Register default debug views
|
||||
const viewsRegistry = Registry.as<IViewsRegistry>(ViewExtensions.ViewsRegistry);
|
||||
viewsRegistry.registerViews([{ id: VARIABLES_VIEW_ID, name: nls.localize('variables', "Variables"), ctorDescriptor: { ctor: VariablesView }, order: 10, weight: 40, canToggleVisibility: true, focusCommand: { id: 'workbench.debug.action.focusVariablesView' } }], VIEW_CONTAINER);
|
||||
viewsRegistry.registerViews([{ id: WATCH_VIEW_ID, name: nls.localize('watch', "Watch"), ctorDescriptor: { ctor: WatchExpressionsView }, order: 20, weight: 10, canToggleVisibility: true, focusCommand: { id: 'workbench.debug.action.focusWatchView' } }], VIEW_CONTAINER);
|
||||
viewsRegistry.registerViews([{ id: CALLSTACK_VIEW_ID, name: nls.localize('callStack', "Call Stack"), ctorDescriptor: { ctor: CallStackView }, order: 30, weight: 30, canToggleVisibility: true, focusCommand: { id: 'workbench.debug.action.focusCallStackView' } }], VIEW_CONTAINER);
|
||||
viewsRegistry.registerViews([{ id: BREAKPOINTS_VIEW_ID, name: nls.localize('breakpoints', "Breakpoints"), ctorDescriptor: { ctor: BreakpointsView }, order: 40, weight: 20, canToggleVisibility: true, focusCommand: { id: 'workbench.debug.action.focusBreakpointsView' } }], VIEW_CONTAINER);
|
||||
viewsRegistry.registerViews([{ id: LOADED_SCRIPTS_VIEW_ID, name: nls.localize('loadedScripts', "Loaded Scripts"), ctorDescriptor: { ctor: LoadedScriptsView }, order: 35, weight: 5, canToggleVisibility: true, collapsed: true, when: CONTEXT_LOADED_SCRIPTS_SUPPORTED }], VIEW_CONTAINER);
|
||||
viewsRegistry.registerViews([{ id: VARIABLES_VIEW_ID, name: nls.localize('variables', "Variables"), ctorDescriptor: { ctor: VariablesView }, order: 10, weight: 40, canToggleVisibility: true, focusCommand: { id: 'workbench.debug.action.focusVariablesView' }, when: CONTEXT_DEBUG_UX.isEqualTo('default') }], VIEW_CONTAINER);
|
||||
viewsRegistry.registerViews([{ id: WATCH_VIEW_ID, name: nls.localize('watch', "Watch"), ctorDescriptor: { ctor: WatchExpressionsView }, order: 20, weight: 10, canToggleVisibility: true, focusCommand: { id: 'workbench.debug.action.focusWatchView' }, when: CONTEXT_DEBUG_UX.isEqualTo('default') }], VIEW_CONTAINER);
|
||||
viewsRegistry.registerViews([{ id: CALLSTACK_VIEW_ID, name: nls.localize('callStack', "Call Stack"), ctorDescriptor: { ctor: CallStackView }, order: 30, weight: 30, canToggleVisibility: true, focusCommand: { id: 'workbench.debug.action.focusCallStackView' }, when: CONTEXT_DEBUG_UX.isEqualTo('default') }], VIEW_CONTAINER);
|
||||
viewsRegistry.registerViews([{ id: BREAKPOINTS_VIEW_ID, name: nls.localize('breakpoints', "Breakpoints"), ctorDescriptor: { ctor: BreakpointsView }, order: 40, weight: 20, canToggleVisibility: true, focusCommand: { id: 'workbench.debug.action.focusBreakpointsView' }, when: CONTEXT_DEBUG_UX.isEqualTo('default') }], VIEW_CONTAINER);
|
||||
viewsRegistry.registerViews([{ id: StartView.ID, name: StartView.LABEL, ctorDescriptor: { ctor: StartView }, order: 10, weight: 40, canToggleVisibility: true, when: CONTEXT_DEBUG_UX.isEqualTo('simple') }], VIEW_CONTAINER);
|
||||
viewsRegistry.registerViews([{ id: LOADED_SCRIPTS_VIEW_ID, name: nls.localize('loadedScripts', "Loaded Scripts"), ctorDescriptor: { ctor: LoadedScriptsView }, order: 35, weight: 5, canToggleVisibility: true, collapsed: true, when: ContextKeyExpr.and(CONTEXT_LOADED_SCRIPTS_SUPPORTED, CONTEXT_DEBUG_UX.isEqualTo('default')) }], VIEW_CONTAINER);
|
||||
|
||||
registerCommands();
|
||||
|
||||
// register action to open viewlet
|
||||
const registry = Registry.as<IWorkbenchActionRegistry>(WorkbenchActionRegistryExtensions.WorkbenchActions);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenDebugPanelAction, OpenDebugPanelAction.ID, OpenDebugPanelAction.LABEL, openPanelKb), 'View: Debug Console', nls.localize('view', "View"));
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenDebugViewletAction, OpenDebugViewletAction.ID, OpenDebugViewletAction.LABEL, openViewletKb), 'View: Show Debug', nls.localize('view', "View"));
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(OpenDebugPanelAction, OpenDebugPanelAction.ID, OpenDebugPanelAction.LABEL, openPanelKb), 'View: Debug Console', nls.localize('view', "View"));
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(OpenDebugViewletAction, OpenDebugViewletAction.ID, OpenDebugViewletAction.LABEL, openViewletKb), 'View: Show Debug', nls.localize('view', "View"));
|
||||
|
||||
Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).registerWorkbenchContribution(DebugCallStackContribution, LifecyclePhase.Restored);
|
||||
Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).registerWorkbenchContribution(DebugToolBar, LifecyclePhase.Restored);
|
||||
@@ -128,16 +129,16 @@ Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).regi
|
||||
|
||||
const debugCategory = nls.localize('debugCategory', "Debug");
|
||||
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(StartAction, StartAction.ID, StartAction.LABEL, { primary: KeyCode.F5 }, CONTEXT_IN_DEBUG_MODE.toNegated()), 'Debug: Start Debugging', debugCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(ConfigureAction, ConfigureAction.ID, ConfigureAction.LABEL), 'Debug: Open launch.json', debugCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(AddFunctionBreakpointAction, AddFunctionBreakpointAction.ID, AddFunctionBreakpointAction.LABEL), 'Debug: Add Function Breakpoint', debugCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(ReapplyBreakpointsAction, ReapplyBreakpointsAction.ID, ReapplyBreakpointsAction.LABEL), 'Debug: Reapply All Breakpoints', debugCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(RunAction, RunAction.ID, RunAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.F5, mac: { primary: KeyMod.WinCtrl | KeyCode.F5 } }), 'Debug: Start Without Debugging', debugCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(RemoveAllBreakpointsAction, RemoveAllBreakpointsAction.ID, RemoveAllBreakpointsAction.LABEL), 'Debug: Remove All Breakpoints', debugCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(EnableAllBreakpointsAction, EnableAllBreakpointsAction.ID, EnableAllBreakpointsAction.LABEL), 'Debug: Enable All Breakpoints', debugCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(DisableAllBreakpointsAction, DisableAllBreakpointsAction.ID, DisableAllBreakpointsAction.LABEL), 'Debug: Disable All Breakpoints', debugCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(SelectAndStartAction, SelectAndStartAction.ID, SelectAndStartAction.LABEL), 'Debug: Select and Start Debugging', debugCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(ClearReplAction, ClearReplAction.ID, ClearReplAction.LABEL), 'Debug: Clear Console', debugCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(StartAction, StartAction.ID, StartAction.LABEL, { primary: KeyCode.F5 }, CONTEXT_IN_DEBUG_MODE.toNegated()), 'Debug: Start Debugging', debugCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(ConfigureAction, ConfigureAction.ID, ConfigureAction.LABEL), 'Debug: Open launch.json', debugCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(AddFunctionBreakpointAction, AddFunctionBreakpointAction.ID, AddFunctionBreakpointAction.LABEL), 'Debug: Add Function Breakpoint', debugCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(ReapplyBreakpointsAction, ReapplyBreakpointsAction.ID, ReapplyBreakpointsAction.LABEL), 'Debug: Reapply All Breakpoints', debugCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(RunAction, RunAction.ID, RunAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.F5, mac: { primary: KeyMod.WinCtrl | KeyCode.F5 } }), 'Debug: Start Without Debugging', debugCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(RemoveAllBreakpointsAction, RemoveAllBreakpointsAction.ID, RemoveAllBreakpointsAction.LABEL), 'Debug: Remove All Breakpoints', debugCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(EnableAllBreakpointsAction, EnableAllBreakpointsAction.ID, EnableAllBreakpointsAction.LABEL), 'Debug: Enable All Breakpoints', debugCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(DisableAllBreakpointsAction, DisableAllBreakpointsAction.ID, DisableAllBreakpointsAction.LABEL), 'Debug: Disable All Breakpoints', debugCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(SelectAndStartAction, SelectAndStartAction.ID, SelectAndStartAction.LABEL), 'Debug: Select and Start Debugging', debugCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(ClearReplAction, ClearReplAction.ID, ClearReplAction.LABEL), 'Debug: Clear Console', debugCategory);
|
||||
|
||||
const registerDebugCommandPaletteItem = (id: string, title: string, when?: ContextKeyExpr, precondition?: ContextKeyExpr) => {
|
||||
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
||||
@@ -167,7 +168,7 @@ registerDebugCommandPaletteItem(TOGGLE_INLINE_BREAKPOINT_ID, nls.localize('inlin
|
||||
|
||||
// Register Quick Open
|
||||
(Registry.as<IQuickOpenRegistry>(QuickOpenExtensions.Quickopen)).registerQuickOpenHandler(
|
||||
new QuickOpenHandlerDescriptor(
|
||||
QuickOpenHandlerDescriptor.create(
|
||||
DebugQuickOpenHandler,
|
||||
DebugQuickOpenHandler.ID,
|
||||
'debug ',
|
||||
@@ -270,6 +271,11 @@ configurationRegistry.registerConfiguration({
|
||||
type: 'boolean',
|
||||
description: nls.localize({ comment: ['This is the description for a setting'], key: 'showBreakpointsInOverviewRuler' }, "Controls whether breakpoints should be shown in the overview ruler."),
|
||||
default: false
|
||||
},
|
||||
'debug.showInlineBreakpointCandidates': {
|
||||
type: 'boolean',
|
||||
description: nls.localize({ comment: ['This is the description for a setting'], key: 'showInlineBreakpointCandidates' }, "Controls whether inline breakpoints candidate decorations should be shown in the editor while debugging."),
|
||||
default: true
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -279,7 +285,7 @@ Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).regi
|
||||
|
||||
// Debug toolbar
|
||||
|
||||
const registerDebugToolBarItem = (id: string, title: string, iconLightUri: URI, iconDarkUri: URI, order: number, when?: ContextKeyExpr, precondition?: ContextKeyExpr) => {
|
||||
const registerDebugToolBarItem = (id: string, title: string, order: number, icon: { light?: URI, dark?: URI } | ThemeIcon, when?: ContextKeyExpr, precondition?: ContextKeyExpr) => {
|
||||
MenuRegistry.appendMenuItem(MenuId.DebugToolBar, {
|
||||
group: 'navigation',
|
||||
when,
|
||||
@@ -287,25 +293,22 @@ const registerDebugToolBarItem = (id: string, title: string, iconLightUri: URI,
|
||||
command: {
|
||||
id,
|
||||
title,
|
||||
iconLocation: {
|
||||
light: iconLightUri,
|
||||
dark: iconDarkUri
|
||||
},
|
||||
icon,
|
||||
precondition
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
registerDebugToolBarItem(CONTINUE_ID, CONTINUE_LABEL, URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/continue-light.svg')), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/continue-dark.svg')), 10, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
registerDebugToolBarItem(PAUSE_ID, PAUSE_LABEL, URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/pause-light.svg')), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/pause-dark.svg')), 10, CONTEXT_DEBUG_STATE.notEqualsTo('stopped'));
|
||||
registerDebugToolBarItem(STOP_ID, STOP_LABEL, URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/stop-light.svg')), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/stop-dark.svg')), 70, CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated());
|
||||
registerDebugToolBarItem(DISCONNECT_ID, DISCONNECT_LABEL, URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/disconnect-light.svg')), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/disconnect-dark.svg')), 70, CONTEXT_FOCUSED_SESSION_IS_ATTACH);
|
||||
registerDebugToolBarItem(STEP_OVER_ID, STEP_OVER_LABEL, URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/step-over-light.svg')), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/step-over-dark.svg')), 20, undefined, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
registerDebugToolBarItem(STEP_INTO_ID, STEP_INTO_LABEL, URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/step-into-light.svg')), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/step-into-dark.svg')), 30, undefined, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
registerDebugToolBarItem(STEP_OUT_ID, STEP_OUT_LABEL, URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/step-out-light.svg')), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/step-out-dark.svg')), 40, undefined, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
registerDebugToolBarItem(RESTART_SESSION_ID, RESTART_LABEL, URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/restart-light.svg')), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/restart-dark.svg')), 60);
|
||||
registerDebugToolBarItem(STEP_BACK_ID, nls.localize('stepBackDebug', "Step Back"), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/step-back-light.svg')), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/step-back-dark.svg')), 50, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
registerDebugToolBarItem(REVERSE_CONTINUE_ID, nls.localize('reverseContinue', "Reverse"), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/reverse-continue-light.svg')), URI.parse(registerAndGetAmdImageURL('vs/workbench/contrib/debug/browser/media/reverse-continue-dark.svg')), 60, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
registerDebugToolBarItem(CONTINUE_ID, CONTINUE_LABEL, 10, { id: 'codicon/debug-continue' }, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
registerDebugToolBarItem(PAUSE_ID, PAUSE_LABEL, 10, { id: 'codicon/debug-pause' }, CONTEXT_DEBUG_STATE.notEqualsTo('stopped'));
|
||||
registerDebugToolBarItem(STOP_ID, STOP_LABEL, 70, { id: 'codicon/debug-stop' }, CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated());
|
||||
registerDebugToolBarItem(DISCONNECT_ID, DISCONNECT_LABEL, 70, { id: 'codicon/debug-disconnect' }, CONTEXT_FOCUSED_SESSION_IS_ATTACH);
|
||||
registerDebugToolBarItem(STEP_OVER_ID, STEP_OVER_LABEL, 20, { id: 'codicon/debug-step-over' }, undefined, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
registerDebugToolBarItem(STEP_INTO_ID, STEP_INTO_LABEL, 30, { id: 'codicon/debug-step-into' }, undefined, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
registerDebugToolBarItem(STEP_OUT_ID, STEP_OUT_LABEL, 40, { id: 'codicon/debug-step-out' }, undefined, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
registerDebugToolBarItem(RESTART_SESSION_ID, RESTART_LABEL, 60, { id: 'codicon/debug-restart' });
|
||||
registerDebugToolBarItem(STEP_BACK_ID, nls.localize('stepBackDebug', "Step Back"), 50, { id: 'codicon/debug-step-back' }, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
registerDebugToolBarItem(REVERSE_CONTINUE_ID, nls.localize('reverseContinue', "Reverse"), 60, { id: 'codicon/debug-reverse-continue' }, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));
|
||||
|
||||
// Debug callstack context menu
|
||||
const registerDebugCallstackItem = (id: string, title: string, order: number, when?: ContextKeyExpr, precondition?: ContextKeyExpr, group = 'navigation') => {
|
||||
@@ -370,7 +373,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
||||
group: '1_debug',
|
||||
command: {
|
||||
id: RunAction.ID,
|
||||
title: nls.localize({ key: 'miStartWithoutDebugging', comment: ['&& denotes a mnemonic'] }, "Start &&Without Debugging")
|
||||
title: nls.localize({ key: 'miRun', comment: ['&& denotes a mnemonic'] }, "Run &&Without Debugging")
|
||||
},
|
||||
order: 2
|
||||
});
|
||||
@@ -554,7 +557,7 @@ if (isMacintosh) {
|
||||
command: {
|
||||
id,
|
||||
title,
|
||||
iconLocation: { dark: iconUri }
|
||||
icon: { dark: iconUri }
|
||||
},
|
||||
when,
|
||||
group: '9_debug',
|
||||
|
||||
@@ -69,7 +69,7 @@ export class StartDebugActionViewItem implements IActionViewItem {
|
||||
render(container: HTMLElement): void {
|
||||
this.container = container;
|
||||
dom.addClass(container, 'start-debug-action-item');
|
||||
this.start = dom.append(container, $('.icon'));
|
||||
this.start = dom.append(container, $('.codicon.codicon-debug-start'));
|
||||
this.start.title = this.action.label;
|
||||
this.start.setAttribute('role', 'button');
|
||||
this.start.tabIndex = 0;
|
||||
|
||||
@@ -62,7 +62,7 @@ export class ConfigureAction extends AbstractDebugAction {
|
||||
@INotificationService private readonly notificationService: INotificationService,
|
||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService
|
||||
) {
|
||||
super(id, label, 'debug-action configure', debugService, keybindingService);
|
||||
super(id, label, 'debug-action codicon codicon-gear', debugService, keybindingService);
|
||||
this._register(debugService.getConfigurationManager().onDidSelectConfiguration(() => this.updateClass()));
|
||||
this.updateClass();
|
||||
}
|
||||
@@ -78,7 +78,7 @@ export class ConfigureAction extends AbstractDebugAction {
|
||||
private updateClass(): void {
|
||||
const configurationManager = this.debugService.getConfigurationManager();
|
||||
const configurationCount = configurationManager.getLaunches().map(l => l.getConfigurationNames().length).reduce((sum, current) => sum + current);
|
||||
this.class = configurationCount > 0 ? 'debug-action configure' : 'debug-action configure notification';
|
||||
this.class = configurationCount > 0 ? 'debug-action codicon codicon-gear' : 'debug-action codicon codicon-gear notification';
|
||||
}
|
||||
|
||||
async run(event?: any): Promise<any> {
|
||||
@@ -143,7 +143,7 @@ export class StartAction extends AbstractDebugAction {
|
||||
|
||||
export class RunAction extends StartAction {
|
||||
static readonly ID = 'workbench.action.debug.run';
|
||||
static LABEL = nls.localize('startWithoutDebugging', "Start Without Debugging");
|
||||
static LABEL = nls.localize('startWithoutDebugging', "Run (Start Without Debugging)");
|
||||
|
||||
protected isNoDebug(): boolean {
|
||||
return true;
|
||||
@@ -186,7 +186,7 @@ export class RemoveAllBreakpointsAction extends AbstractDebugAction {
|
||||
static readonly LABEL = nls.localize('removeAllBreakpoints', "Remove All Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action remove-all', debugService, keybindingService);
|
||||
super(id, label, 'debug-action codicon-close-all', debugService, keybindingService);
|
||||
this._register(this.debugService.getModel().onDidChangeBreakpoints(() => this.updateEnablement()));
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ export class ToggleBreakpointsActivatedAction extends AbstractDebugAction {
|
||||
static readonly DEACTIVATE_LABEL = nls.localize('deactivateBreakpoints', "Deactivate Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action breakpoints-activate', debugService, keybindingService);
|
||||
super(id, label, 'debug-action codicon-activate-breakpoints', debugService, keybindingService);
|
||||
this.updateLabel(this.debugService.getModel().areBreakpointsActivated() ? ToggleBreakpointsActivatedAction.DEACTIVATE_LABEL : ToggleBreakpointsActivatedAction.ACTIVATE_LABEL);
|
||||
|
||||
this._register(this.debugService.getModel().onDidChangeBreakpoints(() => {
|
||||
@@ -287,7 +287,7 @@ export class AddFunctionBreakpointAction extends AbstractDebugAction {
|
||||
static readonly LABEL = nls.localize('addFunctionBreakpoint', "Add Function Breakpoint");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action add-function-breakpoint', debugService, keybindingService);
|
||||
super(id, label, 'debug-action codicon-add', debugService, keybindingService);
|
||||
this._register(this.debugService.getModel().onDidChangeBreakpoints(() => this.updateEnablement()));
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ export class AddWatchExpressionAction extends AbstractDebugAction {
|
||||
static readonly LABEL = nls.localize('addWatchExpression', "Add Expression");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action add-watch-expression', debugService, keybindingService);
|
||||
super(id, label, 'debug-action codicon-add', debugService, keybindingService);
|
||||
this._register(this.debugService.getModel().onDidChangeWatchExpressions(() => this.updateEnablement()));
|
||||
this._register(this.debugService.getViewModel().onDidSelectExpression(() => this.updateEnablement()));
|
||||
}
|
||||
@@ -326,7 +326,7 @@ export class RemoveAllWatchExpressionsAction extends AbstractDebugAction {
|
||||
static readonly LABEL = nls.localize('removeAllWatchExpressions', "Remove All Expressions");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action remove-all', debugService, keybindingService);
|
||||
super(id, label, 'debug-action codicon-close-all', debugService, keybindingService);
|
||||
this._register(this.debugService.getModel().onDidChangeWatchExpressions(() => this.updateEnablement()));
|
||||
}
|
||||
|
||||
|
||||
@@ -128,12 +128,12 @@ export class DebugCallStackContribution implements IWorkbenchContribution {
|
||||
static readonly STICKINESS = TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges;
|
||||
// we need a separate decoration for glyph margin, since we do not want it on each line of a multi line statement.
|
||||
private static TOP_STACK_FRAME_MARGIN: IModelDecorationOptions = {
|
||||
glyphMarginClassName: 'debug-top-stack-frame',
|
||||
glyphMarginClassName: 'codicon-debug-breakpoint-stackframe',
|
||||
stickiness
|
||||
};
|
||||
|
||||
private static FOCUSED_STACK_FRAME_MARGIN: IModelDecorationOptions = {
|
||||
glyphMarginClassName: 'debug-focused-stack-frame',
|
||||
glyphMarginClassName: 'codicon-debug-breakpoint-stackframe-focused',
|
||||
stickiness
|
||||
};
|
||||
|
||||
@@ -176,7 +176,68 @@ registerThemingParticipant((theme, collector) => {
|
||||
if (focusedStackFrame) {
|
||||
collector.addRule(`.monaco-editor .view-overlays .debug-focused-stack-frame-line { background: ${focusedStackFrame}; }`);
|
||||
}
|
||||
|
||||
const debugIconBreakpointColor = theme.getColor(debugIconBreakpointForeground);
|
||||
if (debugIconBreakpointColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-debug-breakpoint,
|
||||
.monaco-workbench .codicon-debug-breakpoint-conditional,
|
||||
.monaco-workbench .codicon-debug-breakpoint-log,
|
||||
.monaco-workbench .codicon-debug-breakpoint-function,
|
||||
.monaco-workbench .codicon-debug-breakpoint-data,
|
||||
.monaco-workbench .codicon-debug-breakpoint-unsupported,
|
||||
.monaco-workbench .codicon-debug-hint:not(*[class*='codicon-debug-breakpoint']) ,
|
||||
.monaco-workbench .codicon-debug-breakpoint-stackframe-dot,
|
||||
.monaco-workbench .codicon-debug-breakpoint.codicon-debug-breakpoint-stackframe-focused::after {
|
||||
color: ${debugIconBreakpointColor} !important;
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
const debugIconBreakpointDisabledColor = theme.getColor(debugIconBreakpointDisabledForeground);
|
||||
if (debugIconBreakpointDisabledColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon[class*='-disabled'] {
|
||||
color: ${debugIconBreakpointDisabledColor} !important;
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
const debugIconBreakpointUnverifiedColor = theme.getColor(debugIconBreakpointUnverifiedForeground);
|
||||
if (debugIconBreakpointUnverifiedColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon[class*='-unverified'] {
|
||||
color: ${debugIconBreakpointUnverifiedColor} !important;
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
const debugIconBreakpointStackframeColor = theme.getColor(debugIconBreakpointStackframeForeground);
|
||||
if (debugIconBreakpointStackframeColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-debug-breakpoint-stackframe,
|
||||
.monaco-workbench .codicon-debug-breakpoint-stackframe-dot::after {
|
||||
color: ${debugIconBreakpointStackframeColor} !important;
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
const debugIconBreakpointStackframeFocusedColor = theme.getColor(debugIconBreakpointStackframeFocusedForeground);
|
||||
if (debugIconBreakpointStackframeFocusedColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .codicon-debug-breakpoint-stackframe-focused {
|
||||
color: ${debugIconBreakpointStackframeFocusedColor} !important;
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
const topStackFrameColor = registerColor('editor.stackFrameHighlightBackground', { dark: '#ffff0033', light: '#ffff6673', hc: '#fff600' }, localize('topStackFrameLineHighlight', 'Background color for the highlight of line at the top stack frame position.'));
|
||||
const focusedStackFrameColor = registerColor('editor.focusedStackFrameHighlightBackground', { dark: '#7abd7a4d', light: '#cee7ce73', hc: '#cee7ce' }, localize('focusedStackFrameLineHighlight', 'Background color for the highlight of line at focused stack frame position.'));
|
||||
|
||||
const debugIconBreakpointForeground = registerColor('debugIcon.breakpointForeground', { dark: '#E51400', light: '#E51400', hc: '#E51400' }, localize('debugIcon.breakpointForeground', 'Icon color for breakpoints.'));
|
||||
const debugIconBreakpointDisabledForeground = registerColor('debugIcon.breakpointDisabledForeground', { dark: '#848484', light: '#848484', hc: '#848484' }, localize('debugIcon.breakpointDisabledForeground', 'Icon color for disabled breakpoints.'));
|
||||
const debugIconBreakpointUnverifiedForeground = registerColor('debugIcon.breakpointUnverifiedForeground', { dark: '#848484', light: '#848484', hc: '#848484' }, localize('debugIcon.breakpointUnverifiedForeground', 'Icon color for unverified breakpoints.'));
|
||||
const debugIconBreakpointStackframeForeground = registerColor('debugIcon.breakpointStackframeForeground', { dark: '#FFCC00', light: '#FFCC00', hc: '#FFCC00' }, localize('debugIcon.breakpointStackframeForeground', 'Icon color for breakpoints.'));
|
||||
const debugIconBreakpointStackframeFocusedForeground = registerColor('debugIcon.breakpointStackframeFocusedForeground', { dark: '#89D185', light: '#89D185', hc: '#89D185' }, localize('debugIcon.breakpointStackframeFocusedForeground', 'Icon color for breakpoints.'));
|
||||
|
||||
@@ -58,15 +58,24 @@ export const DISCONNECT_LABEL = nls.localize('disconnect', "Disconnect");
|
||||
export const STOP_LABEL = nls.localize('stop', "Stop");
|
||||
export const CONTINUE_LABEL = nls.localize('continueDebug', "Continue");
|
||||
|
||||
async function getThreadAndRun(accessor: ServicesAccessor, threadId: number | any, run: (thread: IThread) => Promise<void>): Promise<void> {
|
||||
interface CallStackContext {
|
||||
sessionId: string;
|
||||
threadId: string;
|
||||
frameId: string;
|
||||
}
|
||||
|
||||
function isThreadContext(obj: any): obj is CallStackContext {
|
||||
return obj && typeof obj.sessionId === 'string' && typeof obj.threadId === 'string';
|
||||
}
|
||||
|
||||
async function getThreadAndRun(accessor: ServicesAccessor, sessionAndThreadId: CallStackContext | unknown, run: (thread: IThread) => Promise<void>): Promise<void> {
|
||||
const debugService = accessor.get(IDebugService);
|
||||
let thread: IThread | undefined;
|
||||
if (typeof threadId === 'number') {
|
||||
debugService.getModel().getSessions().forEach(s => {
|
||||
if (!thread) {
|
||||
thread = s.getThread(threadId);
|
||||
}
|
||||
});
|
||||
if (isThreadContext(sessionAndThreadId)) {
|
||||
const session = debugService.getModel().getSession(sessionAndThreadId.sessionId);
|
||||
if (session) {
|
||||
thread = session.getAllThreads().filter(t => t.getId() === sessionAndThreadId.threadId).pop();
|
||||
}
|
||||
} else {
|
||||
thread = debugService.getViewModel().focusedThread;
|
||||
if (!thread) {
|
||||
@@ -81,18 +90,17 @@ async function getThreadAndRun(accessor: ServicesAccessor, threadId: number | an
|
||||
}
|
||||
}
|
||||
|
||||
function getFrame(debugService: IDebugService, frameId: string | undefined): IStackFrame | undefined {
|
||||
if (!frameId) {
|
||||
return undefined;
|
||||
}
|
||||
function isStackFrameContext(obj: any): obj is CallStackContext {
|
||||
return obj && typeof obj.sessionId === 'string' && typeof obj.threadId === 'string' && typeof obj.frameId === 'string';
|
||||
}
|
||||
|
||||
const sessions = debugService.getModel().getSessions();
|
||||
for (let s of sessions) {
|
||||
for (let t of s.getAllThreads()) {
|
||||
for (let sf of t.getCallStack()) {
|
||||
if (sf.getId() === frameId) {
|
||||
return sf;
|
||||
}
|
||||
function getFrame(debugService: IDebugService, context: CallStackContext | unknown): IStackFrame | undefined {
|
||||
if (isStackFrameContext(context)) {
|
||||
const session = debugService.getModel().getSession(context.sessionId);
|
||||
if (session) {
|
||||
const thread = session.getAllThreads().filter(t => t.getId() === context.threadId).pop();
|
||||
if (thread) {
|
||||
return thread.getCallStack().filter(sf => sf.getId() === context.frameId).pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,6 +108,10 @@ function getFrame(debugService: IDebugService, frameId: string | undefined): ISt
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function isSessionContext(obj: any): obj is CallStackContext {
|
||||
return obj && typeof obj.sessionId === 'string';
|
||||
}
|
||||
|
||||
export function registerCommands(): void {
|
||||
|
||||
// These commands are used in call stack context menu, call stack inline actions, command pallete, debug toolbar, mac native touch bar
|
||||
@@ -108,10 +120,10 @@ export function registerCommands(): void {
|
||||
// Same for stackFrame commands and session commands.
|
||||
CommandsRegistry.registerCommand({
|
||||
id: COPY_STACK_TRACE_ID,
|
||||
handler: async (accessor: ServicesAccessor, _: string, frameId: string | undefined) => {
|
||||
handler: async (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
const textResourcePropertiesService = accessor.get(ITextResourcePropertiesService);
|
||||
const clipboardService = accessor.get(IClipboardService);
|
||||
let frame = getFrame(accessor.get(IDebugService), frameId);
|
||||
let frame = getFrame(accessor.get(IDebugService), context);
|
||||
if (frame) {
|
||||
const eol = textResourcePropertiesService.getEOL(frame.source.uri);
|
||||
await clipboardService.writeText(frame.thread.getCallStack().map(sf => sf.toString()).join(eol));
|
||||
@@ -121,22 +133,22 @@ export function registerCommands(): void {
|
||||
|
||||
CommandsRegistry.registerCommand({
|
||||
id: REVERSE_CONTINUE_ID,
|
||||
handler: (accessor: ServicesAccessor, threadId: number | any) => {
|
||||
getThreadAndRun(accessor, threadId, thread => thread.reverseContinue());
|
||||
handler: (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
getThreadAndRun(accessor, context, thread => thread.reverseContinue());
|
||||
}
|
||||
});
|
||||
|
||||
CommandsRegistry.registerCommand({
|
||||
id: STEP_BACK_ID,
|
||||
handler: (accessor: ServicesAccessor, threadId: number | any) => {
|
||||
getThreadAndRun(accessor, threadId, thread => thread.stepBack());
|
||||
handler: (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
getThreadAndRun(accessor, context, thread => thread.stepBack());
|
||||
}
|
||||
});
|
||||
|
||||
CommandsRegistry.registerCommand({
|
||||
id: TERMINATE_THREAD_ID,
|
||||
handler: (accessor: ServicesAccessor, threadId: number | any) => {
|
||||
getThreadAndRun(accessor, threadId, thread => thread.terminate());
|
||||
handler: (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
getThreadAndRun(accessor, context, thread => thread.terminate());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -194,9 +206,12 @@ export function registerCommands(): void {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.Shift | KeyMod.CtrlCmd | KeyCode.F5,
|
||||
when: CONTEXT_IN_DEBUG_MODE,
|
||||
handler: (accessor: ServicesAccessor, _: string, session: IDebugSession | undefined) => {
|
||||
handler: (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
const debugService = accessor.get(IDebugService);
|
||||
if (!session || !session.getId) {
|
||||
let session: IDebugSession | undefined;
|
||||
if (isSessionContext(context)) {
|
||||
session = debugService.getModel().getSession(context.sessionId);
|
||||
} else {
|
||||
session = debugService.getViewModel().focusedSession;
|
||||
}
|
||||
|
||||
@@ -215,8 +230,8 @@ export function registerCommands(): void {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyCode.F10,
|
||||
when: CONTEXT_DEBUG_STATE.isEqualTo('stopped'),
|
||||
handler: (accessor: ServicesAccessor, threadId: number | any) => {
|
||||
getThreadAndRun(accessor, threadId, (thread: IThread) => thread.next());
|
||||
handler: (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
getThreadAndRun(accessor, context, (thread: IThread) => thread.next());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -224,9 +239,9 @@ export function registerCommands(): void {
|
||||
id: STEP_INTO_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib + 10, // Have a stronger weight to have priority over full screen when debugging
|
||||
primary: KeyCode.F11,
|
||||
when: CONTEXT_IN_DEBUG_MODE,
|
||||
handler: (accessor: ServicesAccessor, threadId: number | any) => {
|
||||
getThreadAndRun(accessor, threadId, (thread: IThread) => thread.stepIn());
|
||||
when: CONTEXT_DEBUG_STATE.isEqualTo('stopped'),
|
||||
handler: (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
getThreadAndRun(accessor, context, (thread: IThread) => thread.stepIn());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -235,8 +250,8 @@ export function registerCommands(): void {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.Shift | KeyCode.F11,
|
||||
when: CONTEXT_DEBUG_STATE.isEqualTo('stopped'),
|
||||
handler: (accessor: ServicesAccessor, threadId: number | any) => {
|
||||
getThreadAndRun(accessor, threadId, (thread: IThread) => thread.stepOut());
|
||||
handler: (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
getThreadAndRun(accessor, context, (thread: IThread) => thread.stepOut());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -245,8 +260,8 @@ export function registerCommands(): void {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyCode.F6,
|
||||
when: CONTEXT_DEBUG_STATE.isEqualTo('running'),
|
||||
handler: (accessor: ServicesAccessor, threadId: number | any) => {
|
||||
getThreadAndRun(accessor, threadId, thread => thread.pause());
|
||||
handler: (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
getThreadAndRun(accessor, context, thread => thread.pause());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -264,9 +279,15 @@ export function registerCommands(): void {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyMod.Shift | KeyCode.F5,
|
||||
when: CONTEXT_IN_DEBUG_MODE,
|
||||
handler: (accessor: ServicesAccessor, sessionId: string | undefined) => {
|
||||
handler: (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
const debugService = accessor.get(IDebugService);
|
||||
let session = debugService.getModel().getSession(sessionId) || debugService.getViewModel().focusedSession;
|
||||
let session: IDebugSession | undefined;
|
||||
if (isSessionContext(context)) {
|
||||
session = debugService.getModel().getSession(context.sessionId);
|
||||
} else {
|
||||
session = debugService.getViewModel().focusedSession;
|
||||
}
|
||||
|
||||
const configurationService = accessor.get(IConfigurationService);
|
||||
const showSubSessions = configurationService.getValue<IDebugConfiguration>('debug').showSubSessionsInToolBar;
|
||||
// Stop should be sent to the root parent session
|
||||
@@ -280,9 +301,9 @@ export function registerCommands(): void {
|
||||
|
||||
CommandsRegistry.registerCommand({
|
||||
id: RESTART_FRAME_ID,
|
||||
handler: async (accessor: ServicesAccessor, _: string, frameId: string | undefined) => {
|
||||
handler: async (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
const debugService = accessor.get(IDebugService);
|
||||
let frame = getFrame(debugService, frameId);
|
||||
let frame = getFrame(debugService, context);
|
||||
if (frame) {
|
||||
await frame.restart();
|
||||
}
|
||||
@@ -294,8 +315,8 @@ export function registerCommands(): void {
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyCode.F5,
|
||||
when: CONTEXT_IN_DEBUG_MODE,
|
||||
handler: (accessor: ServicesAccessor, threadId: number | any) => {
|
||||
getThreadAndRun(accessor, threadId, thread => thread.continue());
|
||||
handler: (accessor: ServicesAccessor, context: CallStackContext | unknown) => {
|
||||
getThreadAndRun(accessor, context, thread => thread.continue());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import * as objects from 'vs/base/common/objects';
|
||||
import { URI as uri } from 'vs/base/common/uri';
|
||||
import * as resources from 'vs/base/common/resources';
|
||||
import { IJSONSchema } from 'vs/base/common/jsonSchema';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
import { IEditor } from 'vs/workbench/common/editor';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
@@ -56,6 +57,7 @@ export class ConfigurationManager implements IConfigurationManager {
|
||||
private adapterDescriptorFactories: IDebugAdapterDescriptorFactory[];
|
||||
private debugAdapterFactories = new Map<string, IDebugAdapterFactory>();
|
||||
private debugConfigurationTypeContext: IContextKey<string>;
|
||||
private readonly _onDidRegisterDebugger = new Emitter<void>();
|
||||
|
||||
constructor(
|
||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
||||
@@ -166,6 +168,10 @@ export class ConfigurationManager implements IConfigurationManager {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
get onDidRegisterDebugger(): Event<void> {
|
||||
return this._onDidRegisterDebugger.event;
|
||||
}
|
||||
|
||||
// debug configurations
|
||||
|
||||
registerDebugConfigurationProvider(debugConfigurationProvider: IDebugConfigurationProvider): IDisposable {
|
||||
@@ -196,11 +202,15 @@ export class ConfigurationManager implements IConfigurationManager {
|
||||
const providers = this.configProviders.filter(p => p.type === type && p.resolveDebugConfiguration)
|
||||
.concat(this.configProviders.filter(p => p.type === '*' && p.resolveDebugConfiguration));
|
||||
|
||||
let result: IConfig | null | undefined = config;
|
||||
await sequence(providers.map(provider => async () => {
|
||||
config = (await provider.resolveDebugConfiguration!(folderUri, config, token)) || config;
|
||||
// If any provider returned undefined or null make sure to respect that and do not pass the result to more resolver
|
||||
if (result) {
|
||||
result = await provider.resolveDebugConfiguration!(folderUri, result, token);
|
||||
}
|
||||
}));
|
||||
|
||||
return config;
|
||||
return result;
|
||||
}
|
||||
|
||||
async provideDebugConfigurations(folderUri: uri | undefined, type: string, token: CancellationToken): Promise<any[]> {
|
||||
@@ -262,6 +272,7 @@ export class ConfigurationManager implements IConfigurationManager {
|
||||
});
|
||||
|
||||
this.setCompoundSchemaValues();
|
||||
this._onDidRegisterDebugger.fire();
|
||||
});
|
||||
|
||||
breakpointsExtPoint.setHandler((extensions, delta) => {
|
||||
@@ -275,7 +286,8 @@ export class ConfigurationManager implements IConfigurationManager {
|
||||
|
||||
this.toDispose.push(this.contextService.onDidChangeWorkspaceFolders(() => {
|
||||
this.initLaunches();
|
||||
this.selectConfiguration(this.selectedLaunch);
|
||||
const toSelect = this.selectedLaunch || (this.launches.length > 0 ? this.launches[0] : undefined);
|
||||
this.selectConfiguration(toSelect);
|
||||
this.setCompoundSchemaValues();
|
||||
}));
|
||||
this.toDispose.push(this.configurationService.onDidChangeConfiguration(e => {
|
||||
@@ -384,6 +396,17 @@ export class ConfigurationManager implements IConfigurationManager {
|
||||
return this.debuggers.filter(dbg => strings.equalsIgnoreCase(dbg.type, type)).pop();
|
||||
}
|
||||
|
||||
getDebuggerLabelsForEditor(editor: editorCommon.IEditor | undefined): string[] {
|
||||
if (isCodeEditor(editor)) {
|
||||
const model = editor.getModel();
|
||||
const language = model ? model.getLanguageIdentifier().language : undefined;
|
||||
|
||||
return this.debuggers.filter(a => language && a.languages && a.languages.indexOf(language) >= 0).map(d => d.label);
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
async guessDebugger(type?: string): Promise<Debugger | undefined> {
|
||||
if (type) {
|
||||
const adapter = this.getDebugger(type);
|
||||
@@ -411,16 +434,16 @@ export class ConfigurationManager implements IConfigurationManager {
|
||||
|
||||
candidates.sort((first, second) => first.label.localeCompare(second.label));
|
||||
const picks = candidates.map(c => ({ label: c.label, debugger: c }));
|
||||
const picked = await this.quickInputService.pick<{ label: string, debugger: Debugger | undefined }>([...picks, { type: 'separator' }, { label: 'More...', debugger: undefined }], { placeHolder: nls.localize('selectDebug', "Select Environment") });
|
||||
|
||||
if (picked && picked.debugger) {
|
||||
return picked.debugger;
|
||||
}
|
||||
if (picked) {
|
||||
this.commandService.executeCommand('debug.installAdditionalDebuggers');
|
||||
}
|
||||
|
||||
return undefined;
|
||||
return this.quickInputService.pick<{ label: string, debugger: Debugger | undefined }>([...picks, { type: 'separator' }, { label: nls.localize('more', "More..."), debugger: undefined }], { placeHolder: nls.localize('selectDebug', "Select Environment") })
|
||||
.then(picked => {
|
||||
if (picked && picked.debugger) {
|
||||
return picked.debugger;
|
||||
}
|
||||
if (picked) {
|
||||
this.commandService.executeCommand('debug.installAdditionalDebuggers');
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
}
|
||||
|
||||
async activateDebuggers(activationEvent: string, debugType?: string): Promise<void> {
|
||||
|
||||
@@ -111,7 +111,7 @@ export class RunToCursorAction extends EditorAction {
|
||||
label: RunToCursorAction.LABEL,
|
||||
alias: 'Debug: Run to Cursor',
|
||||
precondition: ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, PanelFocusContext.toNegated(), CONTEXT_DEBUG_STATE.isEqualTo('stopped'), EditorContextKeys.editorTextFocus),
|
||||
menuOpts: {
|
||||
contextMenuOpts: {
|
||||
group: 'debug',
|
||||
order: 2
|
||||
}
|
||||
@@ -160,7 +160,7 @@ class SelectionToReplAction extends EditorAction {
|
||||
label: nls.localize('debugEvaluate', "Debug: Evaluate"),
|
||||
alias: 'Debug: Evaluate',
|
||||
precondition: ContextKeyExpr.and(EditorContextKeys.hasNonEmptySelection, CONTEXT_IN_DEBUG_MODE, EditorContextKeys.editorTextFocus),
|
||||
menuOpts: {
|
||||
contextMenuOpts: {
|
||||
group: 'debug',
|
||||
order: 0
|
||||
}
|
||||
@@ -190,7 +190,7 @@ class SelectionToWatchExpressionsAction extends EditorAction {
|
||||
label: nls.localize('debugAddToWatch', "Debug: Add to Watch"),
|
||||
alias: 'Debug: Add to Watch',
|
||||
precondition: ContextKeyExpr.and(EditorContextKeys.hasNonEmptySelection, CONTEXT_IN_DEBUG_MODE, EditorContextKeys.editorTextFocus),
|
||||
menuOpts: {
|
||||
contextMenuOpts: {
|
||||
group: 'debug',
|
||||
order: 1
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { StandardTokenType } from 'vs/editor/common/modes';
|
||||
import { DEFAULT_WORD_REGEXP } from 'vs/editor/common/model/wordHelper';
|
||||
import { ICodeEditor, IEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser';
|
||||
import { ICodeEditor, IEditorMouseEvent, MouseTargetType, IPartialEditorMouseEvent } from 'vs/editor/browser/editorBrowser';
|
||||
import { registerEditorContribution } from 'vs/editor/browser/editorExtensions';
|
||||
import { IDecorationOptions } from 'vs/editor/common/editorCommon';
|
||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||
@@ -80,7 +80,7 @@ class DebugEditorContribution implements IDebugEditorContribution {
|
||||
this.toDispose.push(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(e)));
|
||||
this.toDispose.push(this.editor.onMouseUp(() => this.mouseDown = false));
|
||||
this.toDispose.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(e)));
|
||||
this.toDispose.push(this.editor.onMouseLeave((e: IEditorMouseEvent) => {
|
||||
this.toDispose.push(this.editor.onMouseLeave((e: IPartialEditorMouseEvent) => {
|
||||
this.provideNonDebugHoverScheduler.cancel();
|
||||
const hoverDomNode = this.hoverWidget.getDomNode();
|
||||
if (!hoverDomNode) {
|
||||
|
||||
@@ -20,7 +20,7 @@ import { renderExpressionValue, replaceWhitespace } from 'vs/workbench/contrib/d
|
||||
import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement';
|
||||
import { attachStylerCallback } from 'vs/platform/theme/common/styler';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { editorHoverBackground, editorHoverBorder, editorHoverForeground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { ModelDecorationOptions } from 'vs/editor/common/model/textModel';
|
||||
import { getExactExpressionStartAndEnd } from 'vs/workbench/contrib/debug/common/debugUtils';
|
||||
import { AsyncDataTree } from 'vs/base/browser/ui/tree/asyncDataTree';
|
||||
@@ -73,12 +73,15 @@ export class DebugHoverWidget implements IContentWidget {
|
||||
this.treeContainer.setAttribute('role', 'tree');
|
||||
const dataSource = new DebugHoverDataSource();
|
||||
|
||||
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'DebugHover', this.treeContainer, new DebugHoverDelegate(), [this.instantiationService.createInstance(VariablesRenderer)],
|
||||
this.tree = this.instantiationService.createInstance<typeof WorkbenchAsyncDataTree, WorkbenchAsyncDataTree<IExpression, IExpression, any>>(WorkbenchAsyncDataTree, 'DebugHover', this.treeContainer, new DebugHoverDelegate(), [this.instantiationService.createInstance(VariablesRenderer)],
|
||||
dataSource, {
|
||||
ariaLabel: nls.localize('treeAriaLabel', "Debug Hover"),
|
||||
accessibilityProvider: new DebugHoverAccessibilityProvider(),
|
||||
mouseSupport: false,
|
||||
horizontalScrolling: true
|
||||
horizontalScrolling: true,
|
||||
overrideStyles: {
|
||||
listBackground: editorHoverBackground
|
||||
}
|
||||
});
|
||||
|
||||
this.valueContainer = $('.value');
|
||||
@@ -90,7 +93,7 @@ export class DebugHoverWidget implements IContentWidget {
|
||||
|
||||
this.editor.applyFontInfo(this.domNode);
|
||||
|
||||
this.toDispose.push(attachStylerCallback(this.themeService, { editorHoverBackground, editorHoverBorder }, colors => {
|
||||
this.toDispose.push(attachStylerCallback(this.themeService, { editorHoverBackground, editorHoverBorder, editorHoverForeground }, colors => {
|
||||
if (colors.editorHoverBackground) {
|
||||
this.domNode.style.backgroundColor = colors.editorHoverBackground.toString();
|
||||
} else {
|
||||
@@ -101,6 +104,11 @@ export class DebugHoverWidget implements IContentWidget {
|
||||
} else {
|
||||
this.domNode.style.border = '';
|
||||
}
|
||||
if (colors.editorHoverForeground) {
|
||||
this.domNode.style.color = colors.editorHoverForeground.toString();
|
||||
} else {
|
||||
this.domNode.style.color = null;
|
||||
}
|
||||
}));
|
||||
this.toDispose.push(this.tree.onDidChangeContentHeight(() => this.layoutTreeAndContainer()));
|
||||
|
||||
|
||||
@@ -40,13 +40,14 @@ import { IAction } from 'vs/base/common/actions';
|
||||
import { deepClone, equals } from 'vs/base/common/objects';
|
||||
import { DebugSession } from 'vs/workbench/contrib/debug/browser/debugSession';
|
||||
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IDebugService, State, IDebugSession, CONTEXT_DEBUG_TYPE, CONTEXT_DEBUG_STATE, CONTEXT_IN_DEBUG_MODE, IThread, IDebugConfiguration, VIEWLET_ID, REPL_ID, IConfig, ILaunch, IViewModel, IConfigurationManager, IDebugModel, IEnablement, IBreakpoint, IBreakpointData, ICompound, IGlobalConfig, IStackFrame, AdapterEndEvent, getStateLabel, IDebugSessionOptions } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { IDebugService, State, IDebugSession, CONTEXT_DEBUG_TYPE, CONTEXT_DEBUG_STATE, CONTEXT_IN_DEBUG_MODE, IThread, IDebugConfiguration, VIEWLET_ID, REPL_ID, IConfig, ILaunch, IViewModel, IConfigurationManager, IDebugModel, IEnablement, IBreakpoint, IBreakpointData, ICompound, IGlobalConfig, IStackFrame, AdapterEndEvent, getStateLabel, IDebugSessionOptions, CONTEXT_DEBUG_UX } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { isExtensionHostDebugging } from 'vs/workbench/contrib/debug/common/debugUtils';
|
||||
import { isErrorWithActions, createErrorWithActions } from 'vs/base/common/errorsWithActions';
|
||||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug';
|
||||
import { isCodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { CancellationTokenSource } from 'vs/base/common/cancellation';
|
||||
import { withUndefinedAsNull } from 'vs/base/common/types';
|
||||
|
||||
const DEBUG_BREAKPOINTS_KEY = 'debug.breakpoint';
|
||||
const DEBUG_FUNCTION_BREAKPOINTS_KEY = 'debug.functionbreakpoint';
|
||||
@@ -85,6 +86,7 @@ export class DebugService implements IDebugService {
|
||||
private debugType: IContextKey<string>;
|
||||
private debugState: IContextKey<string>;
|
||||
private inDebugMode: IContextKey<boolean>;
|
||||
private debugUx: IContextKey<string>;
|
||||
private breakpointsToSendOnResourceSaved: Set<string>;
|
||||
private initializing = false;
|
||||
private previousState: State | undefined;
|
||||
@@ -126,6 +128,8 @@ export class DebugService implements IDebugService {
|
||||
this.debugType = CONTEXT_DEBUG_TYPE.bindTo(contextKeyService);
|
||||
this.debugState = CONTEXT_DEBUG_STATE.bindTo(contextKeyService);
|
||||
this.inDebugMode = CONTEXT_IN_DEBUG_MODE.bindTo(contextKeyService);
|
||||
this.debugUx = CONTEXT_DEBUG_UX.bindTo(contextKeyService);
|
||||
this.debugUx.set(!!this.configurationManager.selectedConfiguration.name ? 'default' : 'simple');
|
||||
|
||||
this.model = new DebugModel(this.loadBreakpoints(), this.loadFunctionBreakpoints(),
|
||||
this.loadExceptionBreakpoints(), this.loadDataBreakpoints(), this.loadWatchExpressions(), this.textFileService);
|
||||
@@ -169,6 +173,9 @@ export class DebugService implements IDebugService {
|
||||
this.toDispose.push(this.viewModel.onDidFocusSession(() => {
|
||||
this.onStateChange();
|
||||
}));
|
||||
this.toDispose.push(this.configurationManager.onDidSelectConfiguration(() => {
|
||||
this.debugUx.set(!!(this.state !== State.Inactive || this.configurationManager.selectedConfiguration.name) ? 'default' : 'simple');
|
||||
}));
|
||||
}
|
||||
|
||||
getModel(): IDebugModel {
|
||||
@@ -225,6 +232,7 @@ export class DebugService implements IDebugService {
|
||||
if (this.previousState !== state) {
|
||||
this.debugState.set(getStateLabel(state));
|
||||
this.inDebugMode.set(state !== State.Inactive);
|
||||
this.debugUx.set(!!(state !== State.Inactive || this.configurationManager.selectedConfiguration.name) ? 'default' : 'simple');
|
||||
this.previousState = state;
|
||||
this._onDidChangeState.fire(state);
|
||||
}
|
||||
@@ -258,7 +266,7 @@ export class DebugService implements IDebugService {
|
||||
try {
|
||||
// make sure to save all files and that the configuration is up to date
|
||||
await this.extensionService.activateByEvent('onDebug');
|
||||
await this.textFileService.saveAll();
|
||||
await this.editorService.saveAll();
|
||||
await this.configurationService.reloadConfiguration(launch ? launch.workspace : undefined);
|
||||
await this.extensionService.whenInstalledExtensionsRegistered();
|
||||
|
||||
@@ -488,8 +496,6 @@ export class DebugService implements IDebugService {
|
||||
}
|
||||
|
||||
const errorMessage = error instanceof Error ? error.message : error;
|
||||
this.telemetryDebugMisconfiguration(session.configuration ? session.configuration.type : undefined, errorMessage);
|
||||
|
||||
await this.showError(errorMessage, isErrorWithActions(error) ? error.actions : []);
|
||||
return false;
|
||||
}
|
||||
@@ -570,7 +576,7 @@ export class DebugService implements IDebugService {
|
||||
}
|
||||
|
||||
async restartSession(session: IDebugSession, restartData?: any): Promise<any> {
|
||||
await this.textFileService.saveAll();
|
||||
await this.editorService.saveAll();
|
||||
const isAutoRestart = !!restartData;
|
||||
|
||||
const runTasks: () => Promise<TaskRunResult> = async () => {
|
||||
@@ -583,19 +589,19 @@ export class DebugService implements IDebugService {
|
||||
return this.runTaskAndCheckErrors(session.root, session.configuration.preLaunchTask);
|
||||
};
|
||||
|
||||
if (session.capabilities.supportsRestartRequest) {
|
||||
if (isExtensionHostDebugging(session.configuration)) {
|
||||
const taskResult = await runTasks();
|
||||
if (taskResult === TaskRunResult.Success) {
|
||||
await session.restart();
|
||||
this.extensionHostDebugService.reload(session.getId());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (isExtensionHostDebugging(session.configuration)) {
|
||||
if (session.capabilities.supportsRestartRequest) {
|
||||
const taskResult = await runTasks();
|
||||
if (taskResult === TaskRunResult.Success) {
|
||||
this.extensionHostDebugService.reload(session.getId());
|
||||
await session.restart();
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -793,6 +799,7 @@ export class DebugService implements IDebugService {
|
||||
// Check that the task isn't busy and if it is, wait for it
|
||||
const busyTasks = await this.taskService.getBusyTasks();
|
||||
if (busyTasks.filter(t => t._id === task._id).length) {
|
||||
taskStarted = true;
|
||||
return inactivePromise;
|
||||
}
|
||||
// task is already running and isn't busy - nothing to do.
|
||||
@@ -808,7 +815,7 @@ export class DebugService implements IDebugService {
|
||||
return inactivePromise;
|
||||
}
|
||||
|
||||
return taskPromise;
|
||||
return taskPromise.then(withUndefinedAsNull);
|
||||
});
|
||||
|
||||
return new Promise((c, e) => {
|
||||
@@ -1200,19 +1207,6 @@ export class DebugService implements IDebugService {
|
||||
});
|
||||
}
|
||||
|
||||
private telemetryDebugMisconfiguration(debugType: string | undefined, message: string): Promise<any> {
|
||||
/* __GDPR__
|
||||
"debugMisconfiguration" : {
|
||||
"type" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
||||
"error": { "classification": "CallstackOrException", "purpose": "FeatureInsight" }
|
||||
}
|
||||
*/
|
||||
return this.telemetryService.publicLog('debugMisconfiguration', {
|
||||
type: debugType,
|
||||
error: message
|
||||
});
|
||||
}
|
||||
|
||||
private telemetryDebugAddBreakpoint(breakpoint: IBreakpoint, context: string): Promise<any> {
|
||||
/* __GDPR__
|
||||
"debugAddBreakpoint" : {
|
||||
|
||||
@@ -720,8 +720,8 @@ export class DebugSession implements IDebugSession {
|
||||
await this.debugService.sendAllBreakpoints(this);
|
||||
} finally {
|
||||
await sendConfigurationDone();
|
||||
await this.fetchThreads();
|
||||
}
|
||||
await this.fetchThreads();
|
||||
}));
|
||||
|
||||
this.rawListeners.push(this.raw.onDidStop(async event => {
|
||||
|
||||
@@ -19,7 +19,7 @@ import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/co
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { Themable } from 'vs/workbench/common/theme';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { registerThemingParticipant, IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { registerColor, contrastBorder, widgetShadow } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
@@ -41,12 +41,73 @@ export const debugToolBarBackground = registerColor('debugToolBar.background', {
|
||||
light: '#F3F3F3',
|
||||
hc: '#000000'
|
||||
}, localize('debugToolBarBackground', "Debug toolbar background color."));
|
||||
|
||||
export const debugToolBarBorder = registerColor('debugToolBar.border', {
|
||||
dark: null,
|
||||
light: null,
|
||||
hc: null
|
||||
}, localize('debugToolBarBorder', "Debug toolbar border color."));
|
||||
|
||||
export const debugIconStartForeground = registerColor('debugIcon.startForeground', {
|
||||
dark: '#89D185',
|
||||
light: '#388A34',
|
||||
hc: '#89D185'
|
||||
}, localize('debugIcon.startForeground', "Debug toolbar icon for start debugging."));
|
||||
|
||||
export const debugIconPauseForeground = registerColor('debugIcon.pauseForeground', {
|
||||
dark: '#75BEFF',
|
||||
light: '#007ACC',
|
||||
hc: '#75BEFF'
|
||||
}, localize('debugIcon.pauseForeground', "Debug toolbar icon for pause."));
|
||||
|
||||
export const debugIconStopForeground = registerColor('debugIcon.stopForeground', {
|
||||
dark: '#F48771',
|
||||
light: '#A1260D',
|
||||
hc: '#F48771'
|
||||
}, localize('debugIcon.stopForeground', "Debug toolbar icon for stop."));
|
||||
|
||||
export const debugIconDisconnectForeground = registerColor('debugIcon.disconnectForeground', {
|
||||
dark: '#F48771',
|
||||
light: '#A1260D',
|
||||
hc: '#F48771'
|
||||
}, localize('debugIcon.disconnectForeground', "Debug toolbar icon for disconnect."));
|
||||
|
||||
export const debugIconRestartForeground = registerColor('debugIcon.restartForeground', {
|
||||
dark: '#89D185',
|
||||
light: '#388A34',
|
||||
hc: '#89D185'
|
||||
}, localize('debugIcon.restartForeground', "Debug toolbar icon for restart."));
|
||||
|
||||
export const debugIconStepOverForeground = registerColor('debugIcon.stepOverForeground', {
|
||||
dark: '#75BEFF',
|
||||
light: '#007ACC',
|
||||
hc: '#75BEFF'
|
||||
}, localize('debugIcon.stepOverForeground', "Debug toolbar icon for step over."));
|
||||
|
||||
export const debugIconStepIntoForeground = registerColor('debugIcon.stepIntoForeground', {
|
||||
dark: '#75BEFF',
|
||||
light: '#007ACC',
|
||||
hc: '#75BEFF'
|
||||
}, localize('debugIcon.stepIntoForeground', "Debug toolbar icon for step into."));
|
||||
|
||||
export const debugIconStepOutForeground = registerColor('debugIcon.stepOutForeground', {
|
||||
dark: '#75BEFF',
|
||||
light: '#007ACC',
|
||||
hc: '#75BEFF'
|
||||
}, localize('debugIcon.stepOutForeground', "Debug toolbar icon for step over."));
|
||||
|
||||
export const debugIconContinueForeground = registerColor('debugIcon.continueForeground', {
|
||||
dark: '#75BEFF',
|
||||
light: '#007ACC',
|
||||
hc: '#75BEFF'
|
||||
}, localize('debugIcon.continueForeground', "Debug toolbar icon for continue."));
|
||||
|
||||
export const debugIconStepBackForeground = registerColor('debugIcon.stepBackForeground', {
|
||||
dark: '#75BEFF',
|
||||
light: '#007ACC',
|
||||
hc: '#75BEFF'
|
||||
}, localize('debugIcon.stepBackForeground', "Debug toolbar icon for step back."));
|
||||
|
||||
export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
||||
|
||||
private $el: HTMLElement;
|
||||
@@ -56,6 +117,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
||||
private updateScheduler: RunOnceScheduler;
|
||||
private debugToolBarMenu: IMenu;
|
||||
private disposeOnUpdate: IDisposable | undefined;
|
||||
private yCoordinate = 0;
|
||||
|
||||
private isVisible = false;
|
||||
private isBuilt = false;
|
||||
@@ -79,7 +141,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
||||
this.$el = dom.$('div.debug-toolbar');
|
||||
this.$el.style.top = `${layoutService.getTitleBarOffset()}px`;
|
||||
|
||||
this.dragArea = dom.append(this.$el, dom.$('div.drag-area'));
|
||||
this.dragArea = dom.append(this.$el, dom.$('div.drag-area.codicon.codicon-gripper'));
|
||||
|
||||
const actionBarContainer = dom.append(this.$el, dom.$('div.action-bar-container'));
|
||||
this.debugToolBarMenu = menuService.createMenu(MenuId.DebugToolBar, contextKeyService);
|
||||
@@ -146,7 +208,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
||||
}));
|
||||
this._register(dom.addDisposableListener(window, dom.EventType.RESIZE, () => this.setCoordinates()));
|
||||
|
||||
this._register(dom.addDisposableListener(this.dragArea, dom.EventType.MOUSE_UP, (event: MouseEvent) => {
|
||||
this._register(dom.addDisposableGenericMouseUpListner(this.dragArea, (event: MouseEvent) => {
|
||||
const mouseClickEvent = new StandardMouseEvent(event);
|
||||
if (mouseClickEvent.detail === 2) {
|
||||
// double click on debug bar centers it again #8250
|
||||
@@ -156,10 +218,10 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(dom.addDisposableListener(this.dragArea, dom.EventType.MOUSE_DOWN, (event: MouseEvent) => {
|
||||
this._register(dom.addDisposableGenericMouseDownListner(this.dragArea, (event: MouseEvent) => {
|
||||
dom.addClass(this.dragArea, 'dragged');
|
||||
|
||||
const mouseMoveListener = dom.addDisposableListener(window, 'mousemove', (e: MouseEvent) => {
|
||||
const mouseMoveListener = dom.addDisposableGenericMouseMoveListner(window, (e: MouseEvent) => {
|
||||
const mouseMoveEvent = new StandardMouseEvent(e);
|
||||
// Prevent default to stop editor selecting text #8524
|
||||
mouseMoveEvent.preventDefault();
|
||||
@@ -167,7 +229,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
||||
this.setCoordinates(mouseMoveEvent.posx - 14, mouseMoveEvent.posy - this.layoutService.getTitleBarOffset());
|
||||
});
|
||||
|
||||
const mouseUpListener = dom.addDisposableListener(window, 'mouseup', (e: MouseEvent) => {
|
||||
const mouseUpListener = dom.addDisposableGenericMouseUpListner(window, (e: MouseEvent) => {
|
||||
this.storePosition();
|
||||
dom.removeClass(this.dragArea, 'dragged');
|
||||
|
||||
@@ -209,9 +271,10 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
||||
}
|
||||
}
|
||||
|
||||
private setYCoordinate(y = 0): void {
|
||||
private setYCoordinate(y = this.yCoordinate): void {
|
||||
const titlebarOffset = this.layoutService.getTitleBarOffset();
|
||||
this.$el.style.top = `${titlebarOffset + y}px`;
|
||||
this.yCoordinate = y;
|
||||
}
|
||||
|
||||
private setCoordinates(x?: number, y?: number): void {
|
||||
@@ -289,3 +352,56 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
registerThemingParticipant((theme, collector) => {
|
||||
|
||||
const debugIconStartColor = theme.getColor(debugIconStartForeground);
|
||||
if (debugIconStartColor) {
|
||||
collector.addRule(`.monaco-workbench .codicon-debug-start { color: ${debugIconStartColor} !important; }`);
|
||||
}
|
||||
|
||||
const debugIconPauseColor = theme.getColor(debugIconPauseForeground);
|
||||
if (debugIconPauseColor) {
|
||||
collector.addRule(`.monaco-workbench .codicon-debug-pause { color: ${debugIconPauseColor} !important; }`);
|
||||
}
|
||||
|
||||
const debugIconStopColor = theme.getColor(debugIconStopForeground);
|
||||
if (debugIconStopColor) {
|
||||
collector.addRule(`.monaco-workbench .codicon-debug-stop { color: ${debugIconStopColor} !important; }`);
|
||||
}
|
||||
|
||||
const debugIconDisconnectColor = theme.getColor(debugIconDisconnectForeground);
|
||||
if (debugIconDisconnectColor) {
|
||||
collector.addRule(`.monaco-workbench .codicon-debug-disconnect { color: ${debugIconDisconnectColor} !important; }`);
|
||||
}
|
||||
|
||||
const debugIconRestartColor = theme.getColor(debugIconRestartForeground);
|
||||
if (debugIconRestartColor) {
|
||||
collector.addRule(`.monaco-workbench .codicon-debug-restart, .monaco-workbench .codicon-debug-restart-frame { color: ${debugIconRestartColor} !important; }`);
|
||||
}
|
||||
|
||||
const debugIconStepOverColor = theme.getColor(debugIconStepOverForeground);
|
||||
if (debugIconStepOverColor) {
|
||||
collector.addRule(`.monaco-workbench .codicon-debug-step-over { color: ${debugIconStepOverColor} !important; }`);
|
||||
}
|
||||
|
||||
const debugIconStepIntoColor = theme.getColor(debugIconStepIntoForeground);
|
||||
if (debugIconStepIntoColor) {
|
||||
collector.addRule(`.monaco-workbench .codicon-debug-step-into { color: ${debugIconStepIntoColor} !important; }`);
|
||||
}
|
||||
|
||||
const debugIconStepOutColor = theme.getColor(debugIconStepOutForeground);
|
||||
if (debugIconStepOutColor) {
|
||||
collector.addRule(`.monaco-workbench .codicon-debug-step-out { color: ${debugIconStepOutColor} !important; }`);
|
||||
}
|
||||
|
||||
const debugIconContinueColor = theme.getColor(debugIconContinueForeground);
|
||||
if (debugIconContinueColor) {
|
||||
collector.addRule(`.monaco-workbench .codicon-debug-continue,.monaco-workbench .codicon-debug-reverse-continue { color: ${debugIconContinueColor} !important; }`);
|
||||
}
|
||||
|
||||
const debugIconStepBackColor = theme.getColor(debugIconStepBackForeground);
|
||||
if (debugIconStepBackColor) {
|
||||
collector.addRule(`.monaco-workbench .codicon-debug-step-back { color: ${debugIconStepBackColor} !important; }`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@ import { IAction } from 'vs/base/common/actions';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { ViewContainerViewlet } from 'vs/workbench/browser/parts/views/viewsViewlet';
|
||||
import { IDebugService, VIEWLET_ID, State, BREAKPOINTS_VIEW_ID, IDebugConfiguration, REPL_ID } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { IDebugService, VIEWLET_ID, State, BREAKPOINTS_VIEW_ID, IDebugConfiguration, REPL_ID, CONTEXT_DEBUG_UX, CONTEXT_DEBUG_UX_KEY } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { StartAction, ConfigureAction, SelectAndStartAction, FocusSessionAction } from 'vs/workbench/contrib/debug/browser/debugActions';
|
||||
import { StartDebugActionViewItem, FocusSessionActionViewItem } from 'vs/workbench/contrib/debug/browser/debugActionViewItems';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -26,20 +26,21 @@ import { memoize } from 'vs/base/common/decorators';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { DebugToolBar } from 'vs/workbench/contrib/debug/browser/debugToolBar';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { ViewletPanel } from 'vs/workbench/browser/parts/views/panelViewlet';
|
||||
import { ViewletPane } from 'vs/workbench/browser/parts/views/paneViewlet';
|
||||
import { IMenu, MenuId, IMenuService, MenuItemAction } from 'vs/platform/actions/common/actions';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { MenuEntryActionViewItem } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { TogglePanelAction } from 'vs/workbench/browser/panel';
|
||||
import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
|
||||
import { StartView } from 'vs/workbench/contrib/debug/browser/startView';
|
||||
|
||||
export class DebugViewlet extends ViewContainerViewlet {
|
||||
|
||||
private startDebugActionViewItem: StartDebugActionViewItem | undefined;
|
||||
private progressResolve: (() => void) | undefined;
|
||||
private breakpointView: ViewletPanel | undefined;
|
||||
private panelListeners = new Map<string, IDisposable>();
|
||||
private breakpointView: ViewletPane | undefined;
|
||||
private paneListeners = new Map<string, IDisposable>();
|
||||
private debugToolBarMenu: IMenu | undefined;
|
||||
private disposeOnTitleUpdate: IDisposable | undefined;
|
||||
|
||||
@@ -61,10 +62,16 @@ export class DebugViewlet extends ViewContainerViewlet {
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||
@INotificationService private readonly notificationService: INotificationService
|
||||
) {
|
||||
super(VIEWLET_ID, `${VIEWLET_ID}.state`, false, configurationService, layoutService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService);
|
||||
super(VIEWLET_ID, `${VIEWLET_ID}.state`, true, configurationService, layoutService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService);
|
||||
|
||||
this._register(this.debugService.onDidChangeState(state => this.onDebugServiceStateChange(state)));
|
||||
this._register(this.debugService.onDidNewSession(() => this.updateToolBar()));
|
||||
this._register(this.contextKeyService.onDidChangeContext(e => {
|
||||
if (e.affectsSome(new Set(CONTEXT_DEBUG_UX_KEY))) {
|
||||
this.updateTitleArea();
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this.contextService.onDidChangeWorkbenchState(() => this.updateTitleArea()));
|
||||
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectsConfiguration('debug.toolBarLocation')) {
|
||||
@@ -83,6 +90,8 @@ export class DebugViewlet extends ViewContainerViewlet {
|
||||
|
||||
if (this.startDebugActionViewItem) {
|
||||
this.startDebugActionViewItem.focus();
|
||||
} else {
|
||||
this.focusView(StartView.ID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +116,9 @@ export class DebugViewlet extends ViewContainerViewlet {
|
||||
}
|
||||
|
||||
getActions(): IAction[] {
|
||||
if (CONTEXT_DEBUG_UX.getValue(this.contextKeyService) === 'simple') {
|
||||
return [];
|
||||
}
|
||||
if (this.showInitialDebugActions) {
|
||||
return [this.startAction, this.configureAction, this.toggleReplAction];
|
||||
}
|
||||
@@ -181,32 +193,32 @@ export class DebugViewlet extends ViewContainerViewlet {
|
||||
}
|
||||
}
|
||||
|
||||
addPanels(panels: { panel: ViewletPanel, size: number, index?: number }[]): void {
|
||||
super.addPanels(panels);
|
||||
addPanes(panes: { pane: ViewletPane, size: number, index?: number }[]): void {
|
||||
super.addPanes(panes);
|
||||
|
||||
for (const { panel } of panels) {
|
||||
for (const { pane: pane } of panes) {
|
||||
// attach event listener to
|
||||
if (panel.id === BREAKPOINTS_VIEW_ID) {
|
||||
this.breakpointView = panel;
|
||||
if (pane.id === BREAKPOINTS_VIEW_ID) {
|
||||
this.breakpointView = pane;
|
||||
this.updateBreakpointsMaxSize();
|
||||
} else {
|
||||
this.panelListeners.set(panel.id, panel.onDidChange(() => this.updateBreakpointsMaxSize()));
|
||||
this.paneListeners.set(pane.id, pane.onDidChange(() => this.updateBreakpointsMaxSize()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
removePanels(panels: ViewletPanel[]): void {
|
||||
super.removePanels(panels);
|
||||
for (const panel of panels) {
|
||||
dispose(this.panelListeners.get(panel.id));
|
||||
this.panelListeners.delete(panel.id);
|
||||
removePanes(panes: ViewletPane[]): void {
|
||||
super.removePanes(panes);
|
||||
for (const pane of panes) {
|
||||
dispose(this.paneListeners.get(pane.id));
|
||||
this.paneListeners.delete(pane.id);
|
||||
}
|
||||
}
|
||||
|
||||
private updateBreakpointsMaxSize(): void {
|
||||
if (this.breakpointView) {
|
||||
// We need to update the breakpoints view since all other views are collapsed #25384
|
||||
const allOtherCollapsed = this.panels.every(view => !view.isExpanded() || view === this.breakpointView);
|
||||
const allOtherCollapsed = this.panes.every(view => !view.isExpanded() || view === this.breakpointView);
|
||||
this.breakpointView.maximumBodySize = allOtherCollapsed ? Number.POSITIVE_INFINITY : this.breakpointView.minimumBodySize;
|
||||
}
|
||||
}
|
||||
@@ -220,6 +232,6 @@ class ToggleReplAction extends TogglePanelAction {
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
|
||||
@IPanelService panelService: IPanelService
|
||||
) {
|
||||
super(id, label, REPL_ID, panelService, layoutService, 'debug-action toggle-repl');
|
||||
super(id, label, REPL_ID, panelService, layoutService, 'debug-action codicon-terminal');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,9 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { mapToSerializable } from 'vs/base/common/map';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { IWorkspaceProvider, IWorkspace } from 'vs/workbench/services/host/browser/browserHostService';
|
||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||
import { hasWorkspaceFileExtension } from 'vs/platform/workspaces/common/workspaces';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
|
||||
class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient implements IExtensionHostDebugService {
|
||||
|
||||
@@ -23,7 +26,8 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i
|
||||
|
||||
constructor(
|
||||
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
|
||||
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService
|
||||
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,
|
||||
@ILogService logService: ILogService
|
||||
) {
|
||||
const connection = remoteAgentService.getConnection();
|
||||
let channel: IChannel;
|
||||
@@ -32,7 +36,7 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i
|
||||
} else {
|
||||
channel = { call: async () => undefined, listen: () => Event.None } as any;
|
||||
// TODO@weinand TODO@isidorn fallback?
|
||||
console.warn('Extension Host Debugging not available due to missing connection.');
|
||||
logService.warn('Extension Host Debugging not available due to missing connection.');
|
||||
}
|
||||
|
||||
super(channel);
|
||||
@@ -41,14 +45,9 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i
|
||||
this.workspaceProvider = environmentService.options.workspaceProvider;
|
||||
} else {
|
||||
this.workspaceProvider = { open: async () => undefined, workspace: undefined };
|
||||
console.warn('Extension Host Debugging not available due to missing workspace provider.');
|
||||
logService.warn('Extension Host Debugging not available due to missing workspace provider.');
|
||||
}
|
||||
|
||||
this.registerListeners(environmentService);
|
||||
}
|
||||
|
||||
private registerListeners(environmentService: IWorkbenchEnvironmentService): void {
|
||||
|
||||
// Reload window on reload request
|
||||
this._register(this.onReload(event => {
|
||||
if (environmentService.isExtensionDevelopment && environmentService.debugExtensionHost.debugId === event.sessionId) {
|
||||
@@ -64,7 +63,8 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i
|
||||
}));
|
||||
}
|
||||
|
||||
async openExtensionDevelopmentHostWindow(args: string[]): Promise<void> {
|
||||
openExtensionDevelopmentHostWindow(args: string[], env: IProcessEnvironment): Promise<void> {
|
||||
|
||||
if (!this.workspaceProvider.payload) {
|
||||
// TODO@Ben remove me once environment is adopted
|
||||
return this.openExtensionDevelopmentHostWindowLegacy(args);
|
||||
@@ -75,16 +75,31 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i
|
||||
const folderUriArg = this.findArgument('folder-uri', args);
|
||||
if (folderUriArg) {
|
||||
debugWorkspace = { folderUri: URI.parse(folderUriArg) };
|
||||
} else {
|
||||
const fileUriArg = this.findArgument('file-uri', args);
|
||||
if (fileUriArg && hasWorkspaceFileExtension(fileUriArg)) {
|
||||
debugWorkspace = { workspaceUri: URI.parse(fileUriArg) };
|
||||
}
|
||||
}
|
||||
|
||||
// Add environment parameters required for debug to work
|
||||
const environment = new Map<string, string>();
|
||||
|
||||
const fileUriArg = this.findArgument('file-uri', args);
|
||||
if (fileUriArg && !hasWorkspaceFileExtension(fileUriArg)) {
|
||||
environment.set('openFile', fileUriArg);
|
||||
}
|
||||
|
||||
const extensionDevelopmentPath = this.findArgument('extensionDevelopmentPath', args);
|
||||
if (extensionDevelopmentPath) {
|
||||
environment.set('extensionDevelopmentPath', extensionDevelopmentPath);
|
||||
}
|
||||
|
||||
const extensionTestsPath = this.findArgument('extensionTestsPath', args);
|
||||
if (extensionTestsPath) {
|
||||
environment.set('extensionTestsPath', extensionTestsPath);
|
||||
}
|
||||
|
||||
const debugId = this.findArgument('debugId', args);
|
||||
if (debugId) {
|
||||
environment.set('debugId', debugId);
|
||||
@@ -96,13 +111,13 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i
|
||||
}
|
||||
|
||||
// Open debug window as new window. Pass ParsedArgs over.
|
||||
this.workspaceProvider.open(debugWorkspace, {
|
||||
return this.workspaceProvider.open(debugWorkspace, {
|
||||
reuse: false, // debugging always requires a new window
|
||||
payload: mapToSerializable(environment) // mandatory properties to enable debugging
|
||||
});
|
||||
}
|
||||
|
||||
private async openExtensionDevelopmentHostWindowLegacy(args: string[]): Promise<void> {
|
||||
private openExtensionDevelopmentHostWindowLegacy(args: string[]): Promise<void> {
|
||||
// we pass the "args" as query parameters of the URL
|
||||
|
||||
let newAddress = `${document.location.origin}${document.location.pathname}?`;
|
||||
@@ -142,6 +157,11 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i
|
||||
addQueryParameter('extensionDevelopmentPath', ep);
|
||||
}
|
||||
|
||||
const etp = findArgument('extensionTestsPath');
|
||||
if (etp) {
|
||||
addQueryParameter('extensionTestsPath', etp);
|
||||
}
|
||||
|
||||
const di = findArgument('debugId');
|
||||
if (di) {
|
||||
addQueryParameter('debugId', di);
|
||||
|
||||
@@ -12,6 +12,7 @@ import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
|
||||
const CONTROL_CODES = '\\u0000-\\u0020\\u007f-\\u009f';
|
||||
const WEB_LINK_REGEX = new RegExp('(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s' + CONTROL_CODES + '"]{2,}[^\\s' + CONTROL_CODES + '"\')}\\],:;.!?]', 'ug');
|
||||
@@ -37,7 +38,8 @@ export class LinkDetector {
|
||||
@IEditorService private readonly editorService: IEditorService,
|
||||
@IFileService private readonly fileService: IFileService,
|
||||
@IOpenerService private readonly openerService: IOpenerService,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@IWorkbenchEnvironmentService private readonly workbenchEnvironmentService: IWorkbenchEnvironmentService
|
||||
) {
|
||||
// noop
|
||||
}
|
||||
@@ -96,7 +98,7 @@ export class LinkDetector {
|
||||
private createWebLink(url: string): Node {
|
||||
const link = this.createLink(url);
|
||||
const uri = URI.parse(url);
|
||||
this.decorateLink(link, () => this.openerService.open(uri));
|
||||
this.decorateLink(link, () => this.openerService.open(uri, { allowTunneling: !!this.workbenchEnvironmentService.configuration.remoteAuthority }));
|
||||
return link;
|
||||
}
|
||||
|
||||
@@ -142,7 +144,7 @@ export class LinkDetector {
|
||||
private decorateLink(link: HTMLElement, onclick: () => void) {
|
||||
link.classList.add('link');
|
||||
link.title = platform.isMacintosh ? nls.localize('fileLinkMac', "Cmd + click to follow link") : nls.localize('fileLink', "Ctrl + click to follow link");
|
||||
link.onmousemove = (event) => link.classList.toggle('pointer', platform.isMacintosh ? event.metaKey : event.ctrlKey);
|
||||
link.onmousemove = (event) => { link.classList.toggle('pointer', platform.isMacintosh ? event.metaKey : event.ctrlKey); };
|
||||
link.onmouseleave = () => link.classList.remove('pointer');
|
||||
link.onclick = (event) => {
|
||||
const selection = window.getSelection();
|
||||
|
||||
@@ -7,7 +7,7 @@ import * as nls from 'vs/nls';
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet';
|
||||
import { normalize, isAbsolute, posix } from 'vs/base/common/path';
|
||||
import { IViewletPanelOptions, ViewletPanel } from 'vs/workbench/browser/parts/views/panelViewlet';
|
||||
import { IViewletPaneOptions, ViewletPane } from 'vs/workbench/browser/parts/views/paneViewlet';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -34,6 +34,7 @@ import { dispose } from 'vs/base/common/lifecycle';
|
||||
import { createMatches, FuzzyScore } from 'vs/base/common/filters';
|
||||
import { DebugContentProvider } from 'vs/workbench/contrib/debug/common/debugContentProvider';
|
||||
import { ILabelService } from 'vs/platform/label/common/label';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
|
||||
const SMART = true;
|
||||
|
||||
@@ -111,7 +112,11 @@ class BaseTreeItem {
|
||||
// a dynamic ID based on the parent chain; required for reparenting (see #55448)
|
||||
getId(): string {
|
||||
const parent = this.getParent();
|
||||
return parent ? `${parent.getId()}/${this._label}` : this._label;
|
||||
return parent ? `${parent.getId()}/${this.getInternalId()}` : this.getInternalId();
|
||||
}
|
||||
|
||||
getInternalId(): string {
|
||||
return this._label;
|
||||
}
|
||||
|
||||
// skips intermediate single-child nodes
|
||||
@@ -254,6 +259,10 @@ class SessionTreeItem extends BaseTreeItem {
|
||||
this._session = session;
|
||||
}
|
||||
|
||||
getInternalId(): string {
|
||||
return this._session.getId();
|
||||
}
|
||||
|
||||
getSession(): IDebugSession {
|
||||
return this._session;
|
||||
}
|
||||
@@ -379,7 +388,7 @@ class SessionTreeItem extends BaseTreeItem {
|
||||
}
|
||||
}
|
||||
|
||||
export class LoadedScriptsView extends ViewletPanel {
|
||||
export class LoadedScriptsView extends ViewletPane {
|
||||
|
||||
private treeContainer!: HTMLElement;
|
||||
private loadedScriptsItemType: IContextKey<string>;
|
||||
@@ -402,7 +411,7 @@ export class LoadedScriptsView extends ViewletPanel {
|
||||
@IDebugService private readonly debugService: IDebugService,
|
||||
@ILabelService private readonly labelService: ILabelService
|
||||
) {
|
||||
super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('loadedScriptsSection', "Loaded Scripts Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
super({ ...(options as IViewletPaneOptions), ariaHeaderLabel: nls.localize('loadedScriptsSection', "Loaded Scripts Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
this.loadedScriptsItemType = CONTEXT_LOADED_SCRIPTS_ITEM_TYPE.bindTo(contextKeyService);
|
||||
}
|
||||
|
||||
@@ -419,7 +428,7 @@ export class LoadedScriptsView extends ViewletPanel {
|
||||
this.treeLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility });
|
||||
this._register(this.treeLabels);
|
||||
|
||||
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'LoadedScriptsView', this.treeContainer, new LoadedScriptsDelegate(),
|
||||
this.tree = this.instantiationService.createInstance<typeof WorkbenchAsyncDataTree, WorkbenchAsyncDataTree<LoadedScriptsItem, LoadedScriptsItem, FuzzyScore>>(WorkbenchAsyncDataTree, 'LoadedScriptsView', this.treeContainer, new LoadedScriptsDelegate(),
|
||||
[new LoadedScriptsRenderer(this.treeLabels)],
|
||||
new LoadedScriptsDataSource(),
|
||||
{
|
||||
@@ -432,6 +441,9 @@ export class LoadedScriptsView extends ViewletPanel {
|
||||
filter: this.filter,
|
||||
accessibilityProvider: new LoadedSciptsAccessibilityProvider(),
|
||||
ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'loadedScriptsAriaLabel' }, "Debug Loaded Scripts"),
|
||||
overrideStyles: {
|
||||
listBackground: SIDE_BAR_BACKGROUND
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 7V8H8V14H7V8H1V7H7V1H8V7H14Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 163 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 7V8H8V14H7V8H1V7H7V1H8V7H14Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 161 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 7V8H8V14H7V8H1V7H7V1H8V7H14Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 163 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 8C4 5.79086 5.79086 4 8 4C10.2091 4 12 5.79086 12 8C12 10.2091 10.2091 12 8 12C5.79086 12 4 10.2091 4 8ZM6 10L6 9L10 9L10 10L6 10ZM6 6L6 7L10 7L10 6L6 6Z" fill="#E51400"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 327 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.2376 8L9.9282 12H5.3094L3 8L5.3094 4H9.9282L12.2376 8Z" fill="#848484"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 189 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.487 8L9.55293 11.35H5.68468L3.75056 8L5.68468 4.65H9.55293L11.487 8Z" stroke="#848484" stroke-width="1.3"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 224 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.2376 8L9.9282 12H5.3094L3 8L5.3094 4H9.9282L12.2376 8Z" fill="#E51400"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 189 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8 4C8.36719 4 8.72135 4.04818 9.0625 4.14453C9.40365 4.23828 9.72135 4.3724 10.0156 4.54688C10.3125 4.72135 10.582 4.93099 10.8242 5.17578C11.069 5.41797 11.2786 5.6875 11.4531 5.98438C11.6276 6.27865 11.7617 6.59635 11.8555 6.9375C11.9518 7.27865 12 7.63281 12 8C12 8.36719 11.9518 8.72135 11.8555 9.0625C11.7617 9.40365 11.6276 9.72266 11.4531 10.0195C11.2786 10.3138 11.069 10.5833 10.8242 10.8281C10.582 11.0703 10.3125 11.2786 10.0156 11.4531C9.72135 11.6276 9.40365 11.763 9.0625 11.8594C8.72135 11.9531 8.36719 12 8 12C7.63281 12 7.27865 11.9531 6.9375 11.8594C6.59635 11.763 6.27734 11.6276 5.98047 11.4531C5.6862 11.2786 5.41667 11.0703 5.17188 10.8281C4.92969 10.5833 4.72135 10.3138 4.54688 10.0195C4.3724 9.72266 4.23698 9.40365 4.14062 9.0625C4.04688 8.72135 4 8.36719 4 8C4 7.63281 4.04688 7.27865 4.14062 6.9375C4.23698 6.59635 4.3724 6.27865 4.54688 5.98438C4.72135 5.6875 4.92969 5.41797 5.17188 5.17578C5.41667 4.93099 5.6862 4.72135 5.98047 4.54688C6.27734 4.3724 6.59635 4.23828 6.9375 4.14453C7.27865 4.04818 7.63281 4 8 4Z" fill="#848484"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8 4L12 10.9048H4L8 4Z" fill="#848484"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 153 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.923 10.375H5.07699L8 5.25973L10.923 10.375Z" stroke="#848484" stroke-width="1.25"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 200 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8 4L12 10.9048H4L8 4Z" fill="#E51400"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 153 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.5">
|
||||
<path d="M8 4C8.36719 4 8.72135 4.04818 9.0625 4.14453C9.40365 4.23828 9.72135 4.3724 10.0156 4.54688C10.3125 4.72135 10.582 4.93099 10.8242 5.17578C11.069 5.41797 11.2786 5.6875 11.4531 5.98438C11.6276 6.27865 11.7617 6.59635 11.8555 6.9375C11.9518 7.27865 12 7.63281 12 8C12 8.36719 11.9518 8.72135 11.8555 9.0625C11.7617 9.40365 11.6276 9.72266 11.4531 10.0195C11.2786 10.3138 11.069 10.5833 10.8242 10.8281C10.582 11.0703 10.3125 11.2786 10.0156 11.4531C9.72135 11.6276 9.40365 11.763 9.0625 11.8594C8.72135 11.9531 8.36719 12 8 12C7.63281 12 7.27865 11.9531 6.9375 11.8594C6.59635 11.763 6.27734 11.6276 5.98047 11.4531C5.6862 11.2786 5.41667 11.0703 5.17188 10.8281C4.92969 10.5833 4.72135 10.3138 4.54688 10.0195C4.3724 9.72266 4.23698 9.40365 4.14062 9.0625C4.04688 8.72135 4 8.36719 4 8C4 7.63281 4.04688 7.27865 4.14062 6.9375C4.23698 6.59635 4.3724 6.27865 4.54688 5.98438C4.72135 5.6875 4.92969 5.41797 5.17188 5.17578C5.41667 4.93099 5.6862 4.72135 5.98047 4.54688C6.27734 4.3724 6.59635 4.23828 6.9375 4.14453C7.27865 4.04818 7.63281 4 8 4Z" fill="#E51400"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8 3L13 8L8 13L3 8L8 3Z" fill="#848484"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 154 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.02039 7.97961L8 3L12.9796 7.97961L8 12.9592L3.02039 7.97961ZM8 10.7696L10.79 7.97961L8 5.18956L5.20996 7.97961L8 10.7696Z" fill="#848484"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 295 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8 3L13 8L8 13L3 8L8 3Z" fill="#E51400"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 154 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.3259 10.2223C11.7654 9.56448 12 8.79112 12 8C12.0001 7.47467 11.8968 6.95447 11.6958 6.4691C11.4948 5.98374 11.2002 5.54273 10.8287 5.17126C10.4573 4.7998 10.0163 4.50517 9.5309 4.3042C9.04553 4.10323 8.52533 3.99986 8 4C7.20888 4 6.43552 4.2346 5.77772 4.67412C5.11992 5.11365 4.60723 5.73836 4.30448 6.46927C4.00173 7.20017 3.92252 8.00444 4.07686 8.78036C4.2312 9.55628 4.61216 10.269 5.17157 10.8284C5.73098 11.3878 6.44372 11.7688 7.21964 11.9231C7.99556 12.0775 8.79983 11.9983 9.53073 11.6955C10.2616 11.3928 10.8864 10.8801 11.3259 10.2223ZM8.65 10H7.4V11H8.65V10ZM7.4 9V5H8.65V9H7.4Z" fill="#E51400"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 767 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 12C10.2091 12 12 10.2091 12 8C12 5.79086 10.2091 4 8 4C5.79086 4 4 5.79086 4 8C4 10.2091 5.79086 12 8 12ZM10.6093 8C10.6093 9.44108 9.44107 10.6093 8 10.6093C6.55893 10.6093 5.39071 9.44108 5.39071 8C5.39071 6.55893 6.55893 5.39071 8 5.39071C9.44107 5.39071 10.6093 6.55893 10.6093 8ZM8 5.24613C9.52092 5.24613 10.7539 6.47908 10.7539 8C10.7539 8 10.7539 8 10.7539 8C10.7539 6.47908 9.52092 5.24613 8 5.24613Z" fill="#848484"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 583 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8 4C8.36719 4 8.72135 4.04818 9.0625 4.14453C9.40365 4.23828 9.72135 4.3724 10.0156 4.54688C10.3125 4.72135 10.582 4.93099 10.8242 5.17578C11.069 5.41797 11.2786 5.6875 11.4531 5.98438C11.6276 6.27865 11.7617 6.59635 11.8555 6.9375C11.9518 7.27865 12 7.63281 12 8C12 8.36719 11.9518 8.72135 11.8555 9.0625C11.7617 9.40365 11.6276 9.72266 11.4531 10.0195C11.2786 10.3138 11.069 10.5833 10.8242 10.8281C10.582 11.0703 10.3125 11.2786 10.0156 11.4531C9.72135 11.6276 9.40365 11.763 9.0625 11.8594C8.72135 11.9531 8.36719 12 8 12C7.63281 12 7.27865 11.9531 6.9375 11.8594C6.59635 11.763 6.27734 11.6276 5.98047 11.4531C5.6862 11.2786 5.41667 11.0703 5.17188 10.8281C4.92969 10.5833 4.72135 10.3138 4.54688 10.0195C4.3724 9.72266 4.23698 9.40365 4.14062 9.0625C4.04688 8.72135 4 8.36719 4 8C4 7.63281 4.04688 7.27865 4.14062 6.9375C4.23698 6.59635 4.3724 6.27865 4.54688 5.98438C4.72135 5.6875 4.92969 5.41797 5.17188 5.17578C5.41667 4.93099 5.6862 4.72135 5.98047 4.54688C6.27734 4.3724 6.59635 4.23828 6.9375 4.14453C7.27865 4.04818 7.63281 4 8 4Z" fill="#E51400"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -16,7 +16,16 @@
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.monaco-editor .zone-widget .zone-widget-container.breakpoint-widget .breakpoint-select-container .monaco-select-box {
|
||||
min-width: 100px;
|
||||
min-height: 18px;
|
||||
padding: 2px 20px 2px 8px;
|
||||
}
|
||||
|
||||
.monaco-editor .zone-widget .zone-widget-container.breakpoint-widget .breakpoint-select-container:after {
|
||||
right: 14px;
|
||||
}
|
||||
|
||||
.monaco-editor .zone-widget .zone-widget-container.breakpoint-widget .inputContainer {
|
||||
flex: 1;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.62132 8.0858L7.91421 7.37869L6.5 8.7929L5.08579 7.37869L4.37868 8.0858L5.79289 9.50001L4.37868 10.9142L5.08579 11.6213L6.5 10.2071L7.91421 11.6213L8.62132 10.9142L7.20711 9.50001L8.62132 8.0858Z" fill="#C5C5C5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 3L6 2H13L14 3V10L13 11H11V13L10 14H3L2 13V6L3 5H5V3ZM6 5H10L11 6V10H13V3H6V5ZM10 6H3V13H10V6Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 532 B |
@@ -1,4 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.62132 8.0858L7.91421 7.37869L6.5 8.7929L5.08579 7.37869L4.37868 8.0858L5.79289 9.50001L4.37868 10.9142L5.08579 11.6213L6.5 10.2071L7.91421 11.6213L8.62132 10.9142L7.20711 9.50001L8.62132 8.0858Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 3L6 2H13L14 3V10L13 11H11V13L10 14H3L2 13V6L3 5H5V3ZM6 5H10L11 6V10H13V3H6V5ZM10 6H3V13H10V6Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 528 B |
@@ -1,4 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.62132 8.0858L7.91421 7.37869L6.5 8.7929L5.08579 7.37869L4.37868 8.0858L5.79289 9.50001L4.37868 10.9142L5.08579 11.6213L6.5 10.2071L7.91421 11.6213L8.62132 10.9142L7.20711 9.50001L8.62132 8.0858Z" fill="#424242"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 3L6 2H13L14 3V10L13 11H11V13L10 14H3L2 13V6L3 5H5V3ZM6 5H10L11 6V10H13V3H6V5ZM10 6H3V13H10V6Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 532 B |
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1 1H15V15H1V1ZM2 14H14V2H2V14ZM4.00008 5.70709L4.70718 4.99999L8.24272 8.53552L7.53561 9.24263L7.53558 9.2426L4.70711 12.0711L4 11.364L6.82848 8.53549L4.00008 5.70709Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 339 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1 1H15V15H1V1ZM2 14H14V2H2V14ZM4.00008 5.70709L4.70718 4.99999L8.24272 8.53552L7.53561 9.24263L7.53558 9.2426L4.70711 12.0711L4 11.364L6.82848 8.53549L4.00008 5.70709Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 337 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1 1H15V15H1V1ZM2 14H14V2H2V14ZM4.00008 5.70709L4.70718 4.99999L8.24272 8.53552L7.53561 9.24263L7.53558 9.2426L4.70711 12.0711L4 11.364L6.82848 8.53549L4.00008 5.70709Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 339 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 2H4V2.24001L4 14L2.5 14L2.5 2ZM6 2.18094V14L15 8.06218L6 2.18094ZM12.3148 8.06218L7.50024 5L7.50024 11.1809L12.3148 8.06218Z" fill="#75BEFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 300 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 2H4V2.24001L4 14L2.5 14L2.5 2ZM6 2.18094V14L15 8.06218L6 2.18094ZM12.3148 8.06218L7.50024 5L7.50024 11.1809L12.3148 8.06218Z" fill="#75BEFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 300 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 2H4V2.24001L4 14L2.5 14L2.5 2ZM6 2.18094V14L15 8.06218L6 2.18094ZM12.3148 8.06218L7.50024 5L7.50024 11.1809L12.3148 8.06218Z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 300 B |
@@ -1,4 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 8C10 8.39556 9.8827 8.78224 9.66294 9.11114C9.44318 9.44004 9.13082 9.69638 8.76537 9.84776C8.39992 9.99913 7.99778 10.0387 7.60982 9.96157C7.22186 9.8844 6.86549 9.69392 6.58579 9.41421C6.30608 9.13451 6.1156 8.77814 6.03843 8.39018C5.96126 8.00222 6.00087 7.60009 6.15224 7.23463C6.30362 6.86918 6.55996 6.55682 6.88886 6.33706C7.21776 6.1173 7.60444 6 8 6C8.53043 6 9.03914 6.21071 9.41421 6.58579C9.78929 6.96086 10 7.46957 10 8Z" fill="#E51400"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 3.25L4.25 2H9.30677L10.2355 2.41331L14.4986 7.14518L14.5 8.81702L10.2368 13.5647L9.30677 13.9796H4.25L3 12.7296V3.25ZM4.25 12.7296V3.25H9.30677L13.5699 7.98187L9.30677 12.7296H4.25Z" fill="#FFCC00"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 820 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 3.25L4.25 2H9.30677L10.2355 2.41331L14.4986 7.14518L14.5 8.81702L10.2368 13.5647L9.30677 13.9796H4.25L3 12.7296V3.25ZM4.25 12.7296V3.25H9.30677L13.5699 7.98187L9.30677 12.7296H4.25Z" fill="#FFCC00"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 355 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.46279 12.86L3.45815 12.79C3.45964 12.8134 3.46119 12.8367 3.46279 12.86Z" fill="white"/>
|
||||
<path d="M10.7275 13.5509L7.69304 10.501L8.70723 9.4868L11.9159 12.7117L15.0789 9.54875L16.0931 10.5629L13.0589 13.5972L16.0934 16.647L15.0792 17.6612L11.8705 14.4362L8.70748 17.5993L7.69329 16.5851L10.7275 13.5509Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.9329 5.00286V6H18.2784L21.1205 3.15788L22.1347 4.17207L19.4435 6.86321L19.476 6.94805C20.0424 8.42597 20.3614 10.094 20.3614 11.86C20.3614 12.1955 20.3499 12.5274 20.3274 12.8552L20.3222 12.93H23.8629V14.3643H20.142L20.1315 14.4217C19.8292 16.075 19.2409 17.5825 18.4398 18.851L18.3802 18.9454L21.8027 22.3852L20.7859 23.3968L17.512 20.1063L17.4131 20.2169C15.934 21.8712 14.0177 22.8629 11.93 22.8629C9.81001 22.8629 7.86653 21.8402 6.37842 20.1395L6.27988 20.0268L3.07125 23.2355L2.05706 22.2213L5.42258 18.8558L5.36431 18.7615C4.59172 17.5118 4.02373 16.0363 3.72847 14.4217L3.71797 14.3643H0V12.93H3.53777L3.53262 12.8552C3.51009 12.5274 3.49858 12.1955 3.49858 11.86C3.49858 10.117 3.80935 8.46951 4.36194 7.00599L4.39377 6.92168L1.63228 4.14621L2.64904 3.13457L5.50003 6H6.92715V5.00286C6.92715 2.23986 9.16701 0 11.93 0C14.693 0 16.9329 2.23986 16.9329 5.00286ZM8.36144 5.00286V6H15.4986V5.00286C15.4986 3.03199 13.9009 1.43429 11.93 1.43429C9.95914 1.43429 8.36144 3.03199 8.36144 5.00286ZM18.1609 7.52498L18.1267 7.43429H5.73328L5.69915 7.52498C5.21331 8.81605 4.93286 10.2859 4.93286 11.86C4.93286 14.6199 5.7951 17.061 7.11691 18.7793C8.43755 20.4962 10.1529 21.4286 11.93 21.4286C13.7072 21.4286 15.4225 20.4962 16.7431 18.7793C18.0649 17.061 18.9271 14.6199 18.9271 11.86C18.9271 10.2859 18.6467 8.81605 18.1609 7.52498Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.8 KiB |
@@ -3,49 +3,43 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* Activity Bar */
|
||||
.monaco-workbench .activitybar .monaco-action-bar .action-label.debug {
|
||||
-webkit-mask: url('debug-activity-bar.svg') no-repeat 50% 50%;
|
||||
}
|
||||
|
||||
.monaco-editor .debug-top-stack-frame-column::before {
|
||||
background: url('current-arrow.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-breakpoint-hint {
|
||||
background: url('breakpoint-hint.svg') center center no-repeat;
|
||||
.codicon-debug-hint {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.debug-breakpoint-disabled,
|
||||
.monaco-editor .inline-breakpoint-widget.debug-breakpoint-disabled {
|
||||
background: url('breakpoint-disabled.svg') center center no-repeat;
|
||||
.codicon-debug-hint:not(*[class*='codicon-debug-breakpoint']) {
|
||||
opacity: .4 !important;
|
||||
}
|
||||
|
||||
.monaco-editor .inline-breakpoint-widget.debug-breakpoint-disabled:hover {
|
||||
background: url('breakpoint-hint.svg') center center no-repeat;
|
||||
.inline-breakpoint-widget.codicon {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* overlapped icons */
|
||||
.inline-breakpoint-widget.codicon-debug-breakpoint-stackframe-dot::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.codicon-debug-breakpoint.codicon-debug-breakpoint-stackframe-focused::after {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.inline-breakpoint-widget.codicon-debug-breakpoint-stackframe-dot::after {
|
||||
content: "\eb8b";
|
||||
}
|
||||
|
||||
.codicon-debug-breakpoint.codicon-debug-breakpoint-stackframe-focused::after {
|
||||
content: "\eb8a";
|
||||
}
|
||||
|
||||
.monaco-editor .inline-breakpoint-widget.line-start {
|
||||
left: -0.45em !important;
|
||||
}
|
||||
|
||||
.debug-breakpoint-unverified,
|
||||
.monaco-editor .inline-breakpoint-widget.debug-breakpoint-unverified {
|
||||
background: url('breakpoint-unverified.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.monaco-editor .debug-top-stack-frame {
|
||||
background: url('current-arrow.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.monaco-editor .debug-focused-stack-frame {
|
||||
background: url('stackframe-arrow.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-breakpoint,
|
||||
.monaco-editor .inline-breakpoint-widget {
|
||||
background: url('breakpoint.svg') center center no-repeat;
|
||||
left: -8px !important;
|
||||
}
|
||||
|
||||
.monaco-editor .debug-breakpoint-placeholder::before,
|
||||
@@ -58,6 +52,14 @@
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
/* Do not show call stack decoration when we plan to show breakpoint and top stack frame in one decoration */
|
||||
.monaco-editor .debug-breakpoint-placeholder ~ .debug-top-stack-frame-column::before {
|
||||
width: 0em;
|
||||
content: "";
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.monaco-editor .debug-top-stack-frame-column::before {
|
||||
height: 1.3em;
|
||||
}
|
||||
@@ -66,68 +68,6 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.debug-function-breakpoint {
|
||||
background: url('breakpoint-function.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-function-breakpoint-unverified {
|
||||
background: url('breakpoint-function-unverified.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-function-breakpoint-disabled {
|
||||
background: url('breakpoint-function-disabled.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-data-breakpoint {
|
||||
background: url('breakpoint-data.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-data-breakpoint-unverified {
|
||||
background: url('breakpoint-data-unverified.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-data-breakpoint-disabled {
|
||||
background: url('breakpoint-data-disabled.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-breakpoint-conditional,
|
||||
.monaco-editor .inline-breakpoint-widget.debug-breakpoint-conditional {
|
||||
background: url('breakpoint-conditional.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-breakpoint-log,
|
||||
.monaco-editor .inline-breakpoint-widget.debug-breakpoint-log {
|
||||
background: url('breakpoint-log.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-breakpoint-log-disabled,
|
||||
.monaco-editor .inline-breakpoint-widget.debug-breakpoint-log-disabled {
|
||||
background: url('breakpoint-log-disabled.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-breakpoint-log-unverified,
|
||||
.monaco-editor .inline-breakpoint-widget.debug-breakpoint-log-unverified {
|
||||
background: url('breakpoint-log-unverified.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-breakpoint-unsupported,
|
||||
.monaco-editor .inline-breakpoint-widget.debug-breakpoint-unsupported {
|
||||
background: url('breakpoint-unsupported.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.monaco-editor .debug-top-stack-frame.debug-breakpoint,
|
||||
.monaco-editor .debug-top-stack-frame.debug-breakpoint-conditional,
|
||||
.monaco-editor .debug-top-stack-frame.debug-breakpoint-log,
|
||||
.monaco-editor .inline-breakpoint-widget.debug-top-stack-frame-column {
|
||||
background: url('current-and-breakpoint.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.monaco-editor .debug-focused-stack-frame.debug-breakpoint,
|
||||
.monaco-editor .debug-focused-stack-frame.debug-breakpoint-conditional,
|
||||
.monaco-editor .debug-focused-stack-frame.debug-breakpoint-log {
|
||||
background: url('stackframe-and-breakpoint.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
/* Error editor */
|
||||
.debug-error-editor:focus {
|
||||
outline: none !important;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
animation-duration: 0.15s;
|
||||
animation-name: fadeIn;
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
word-break: break-all;
|
||||
padding: 4px 5px;
|
||||
}
|
||||
@@ -38,6 +39,7 @@
|
||||
|
||||
.monaco-editor .debug-hover-widget .debug-hover-tree .monaco-list-row .monaco-tl-contents {
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
}
|
||||
|
||||
/* Disable tree highlight in debug hover tree. */
|
||||
|
||||
@@ -19,12 +19,19 @@
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.monaco-workbench .debug-toolbar .monaco-action-bar .action-item.select-container .monaco-select-box,
|
||||
.monaco-workbench .start-debug-action-item .select-container .monaco-select-box {
|
||||
padding: 0 22px 0 6px;
|
||||
}
|
||||
|
||||
.monaco-workbench .debug-toolbar .drag-area {
|
||||
cursor: grab;
|
||||
height: 32px;
|
||||
width: 16px;
|
||||
background: url('drag.svg') center center no-repeat;
|
||||
background-size: 16px 16px;
|
||||
opacity: 0.5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.monaco-workbench .debug-toolbar .drag-area.dragged {
|
||||
@@ -38,4 +45,7 @@
|
||||
background-size: 16px;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@@ -13,40 +13,39 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Actionbar actions */
|
||||
|
||||
.monaco-workbench .debug-action.configure {
|
||||
background: url('configure-light.svg') center center no-repeat;
|
||||
.debug-viewlet .debug-start-view {
|
||||
padding: 0 20px 0 20px;
|
||||
}
|
||||
|
||||
.vs-dark .monaco-workbench .debug-action.configure {
|
||||
background: url('configure-dark.svg') center center no-repeat;
|
||||
.debug-viewlet .debug-start-view .monaco-button,
|
||||
.debug-viewlet .debug-start-view .section {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.hc-black .monaco-workbench .debug-action.configure {
|
||||
background: url('configure-hc.svg') center center no-repeat;
|
||||
.debug-viewlet .debug-start-view .top-section {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.monaco-workbench .debug-action.toggle-repl {
|
||||
background: url('console-light.svg') center center no-repeat;
|
||||
.debug-viewlet .debug-start-view .monaco-button {
|
||||
max-width: 260px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.vs-dark .monaco-workbench .debug-action.toggle-repl {
|
||||
background: url('console-dark.svg') center center no-repeat;
|
||||
.debug-viewlet .debug-start-view .click {
|
||||
cursor: pointer;
|
||||
color: #007ACC;
|
||||
}
|
||||
|
||||
.hc-black .monaco-workbench .debug-action.toggle-repl {
|
||||
background: url('console-hc.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.monaco-workbench .debug-action.notification:before {
|
||||
.monaco-workbench .debug-action.notification:after {
|
||||
content: '';
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background-color: #CC6633;
|
||||
position: absolute;
|
||||
top: 11px;
|
||||
right: 5px;
|
||||
top: 10px;
|
||||
right: 6px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid white;
|
||||
}
|
||||
@@ -65,24 +64,11 @@
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.monaco-workbench .part > .title > .title-actions .start-debug-action-item .icon {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
background: url('start-light.svg') no-repeat;
|
||||
background-size: 16px 16px;
|
||||
background-position: center center;
|
||||
.monaco-workbench .part > .title > .title-actions .start-debug-action-item .codicon {
|
||||
flex-shrink: 0;
|
||||
transition: transform 50ms ease;
|
||||
}
|
||||
|
||||
.vs-dark .monaco-workbench .part > .title > .title-actions .start-debug-action-item .icon {
|
||||
background-image: url('start-dark.svg');
|
||||
}
|
||||
|
||||
.hc-black .monaco-workbench .part > .title > .title-actions .start-debug-action-item .icon {
|
||||
background-image: url('start-hc.svg');
|
||||
}
|
||||
|
||||
.monaco-workbench .monaco-action-bar .start-debug-action-item .configuration .monaco-select-box {
|
||||
border: none;
|
||||
margin-top: 0px;
|
||||
@@ -95,7 +81,7 @@
|
||||
cursor: initial;
|
||||
}
|
||||
|
||||
.monaco-workbench .part > .title > .title-actions .start-debug-action-item .icon.active {
|
||||
.monaco-workbench .part > .title > .title-actions .start-debug-action-item .codicon.active {
|
||||
transform: scale(1.272019649, 1.272019649);
|
||||
}
|
||||
|
||||
@@ -117,6 +103,10 @@
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.debug-viewlet .monaco-list:focus .monaco-list-row.selected.focused .codicon {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
.debug-viewlet .disabled {
|
||||
opacity: 0.35;
|
||||
}
|
||||
@@ -179,9 +169,11 @@
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .thread:hover > .state,
|
||||
.debug-viewlet .debug-call-stack .session:hover > .state,
|
||||
.debug-viewlet .debug-call-stack .monaco-list-row.focused .state {
|
||||
.debug-viewlet .debug-call-stack .monaco-list-row:hover .state {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list-row:hover .stack-frame.has-actions .file {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -189,7 +181,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list-row.focused .monaco-action-bar,
|
||||
.debug-viewlet .debug-call-stack .monaco-list-row:hover .monaco-action-bar {
|
||||
display: initial;
|
||||
}
|
||||
@@ -198,6 +189,7 @@
|
||||
width: 16px;
|
||||
height: 100%;
|
||||
margin-right: 8px;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .thread > .state > .label,
|
||||
@@ -224,6 +216,7 @@
|
||||
flex: 1;
|
||||
flex-shrink: 0;
|
||||
min-width: fit-content;
|
||||
min-width: -moz-fit-content;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .stack-frame.subtle {
|
||||
@@ -278,100 +271,8 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .debug-action.stop {
|
||||
background: url('stop-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list:focus .monaco-list-row.selected .debug-action.stop {
|
||||
background: url('stop-white.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .debug-call-stack .debug-action.stop {
|
||||
background: url('stop-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .debug-action.disconnect {
|
||||
background: url('disconnect-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .debug-call-stack .debug-action.disconnect {
|
||||
background: url('disconnect-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list:focus .monaco-list-row.selected .debug-action.disconnect {
|
||||
background: url('disconnect-white.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .debug-action.restart {
|
||||
background: url('restart-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .debug-call-stack .debug-action.restart {
|
||||
background: url('restart-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list:focus .monaco-list-row.selected .debug-action.restart {
|
||||
background: url('restart-white.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .debug-action.step-over {
|
||||
background: url('step-over-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .debug-call-stack .debug-action.step-over {
|
||||
background: url('step-over-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list:focus .monaco-list-row.selected .debug-action.step-over {
|
||||
background: url('step-over-white.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .debug-action.step-into {
|
||||
background: url('step-into-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .debug-call-stack .debug-action.step-into {
|
||||
background: url('step-into-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list:focus .monaco-list-row.selected .debug-action.step-into {
|
||||
background: url('step-into-white.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .debug-action.step-out {
|
||||
background: url('step-out-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .debug-call-stack .debug-action.step-out {
|
||||
background: url('step-out-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list:focus .monaco-list-row.selected .debug-action.step-out {
|
||||
background: url('step-out-white.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .debug-action.pause {
|
||||
background: url('pause-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .debug-call-stack .debug-action.pause {
|
||||
background: url('pause-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list:focus .monaco-list-row.selected .debug-action.pause {
|
||||
background: url('pause-white.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .debug-action.continue {
|
||||
background: url('continue-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .debug-call-stack .debug-action.continue {
|
||||
background: url('continue-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-call-stack .monaco-list:focus .monaco-list-row.selected .debug-action.continue {
|
||||
background: url('continue-white.svg') center center no-repeat;
|
||||
.debug-viewlet .debug-call-stack .monaco-list:focus .monaco-list-row.selected .codicon {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
/* Variables & Expression view */
|
||||
@@ -435,21 +336,6 @@
|
||||
flex : 1;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-action.add-watch-expression,
|
||||
.debug-viewlet .debug-action.add-function-breakpoint {
|
||||
background: url('add-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .debug-action.add-watch-expression,
|
||||
.vs-dark .debug-viewlet .debug-action.add-function-breakpoint {
|
||||
background: url('add-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.hc-black .debug-viewlet .debug-action.add-watch-expression,
|
||||
.hc-black .debug-viewlet .debug-action.add-function-breakpoint {
|
||||
background: url('add-hc.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .monaco-list-row .expression .value.changed {
|
||||
animation-name: debugViewletValueChanged;
|
||||
}
|
||||
@@ -479,10 +365,17 @@
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-breakpoints .breakpoint > .icon {
|
||||
.debug-viewlet .debug-breakpoints .breakpoint > .codicon {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
min-width: 19px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-breakpoints .breakpoint > .codicon-debug-breakpoint-stackframe-dot::before {
|
||||
content: "\ea71";
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-breakpoints .breakpoint > .file-path {
|
||||
@@ -499,30 +392,6 @@
|
||||
text-overflow: ellipsis
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-action.remove-all {
|
||||
background: url('close-all-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .debug-action.remove-all {
|
||||
background: url('close-all-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.hc-black .debug-viewlet .debug-action.remove-all {
|
||||
background: url('close-all-hc.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.debug-viewlet .debug-action.breakpoints-activate {
|
||||
background: url('toggle-breakpoints-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-viewlet .debug-action.breakpoints-activate {
|
||||
background: url('toggle-breakpoints-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.hc-black .debug-viewlet .debug-action.breakpoints-activate {
|
||||
background: url('toggle-breakpoints-hc.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
/* No workspace view */
|
||||
|
||||
.debug-viewlet > .noworkspace-view {
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.6172 3.84375C13.5169 3.5293 13.3665 3.23991 13.166 2.97559L14.5195 1.61523L13.9043 1L12.5439 2.35352C12.2796 2.15299 11.9902 2.0026 11.6758 1.90234C11.3659 1.79753 11.0446 1.74512 10.7119 1.74512C10.3063 1.74512 9.91439 1.82259 9.53613 1.97754C9.16243 2.13249 8.83203 2.35352 8.54492 2.64062L7 4.19238L11.3271 8.51953L12.8789 6.97461C13.166 6.6875 13.387 6.3571 13.542 5.9834C13.6969 5.60514 13.7744 5.21322 13.7744 4.80762C13.7744 4.47493 13.722 4.15365 13.6172 3.84375ZM12.7285 5.64844C12.6191 5.91276 12.4619 6.14746 12.2568 6.35254L11.3271 7.28223L8.2373 4.19238L9.16699 3.2627C9.37207 3.05762 9.60677 2.90039 9.87109 2.79102C10.14 2.67708 10.4202 2.62012 10.7119 2.62012C11.0127 2.62012 11.2952 2.67936 11.5596 2.79785C11.8239 2.91178 12.054 3.06901 12.25 3.26953C12.4505 3.46549 12.6077 3.69564 12.7217 3.95996C12.8402 4.22428 12.8994 4.50684 12.8994 4.80762C12.8994 5.09928 12.8424 5.37956 12.7285 5.64844ZM7.9043 10.6416L9.3877 9.09668L8.77246 8.47461L7.28223 10.0264L5.42285 8.16699L6.91309 6.61523L6.29102 6L4.80762 7.54492L4.19238 6.92969L2.64062 8.47461C2.35352 8.76172 2.13249 9.0944 1.97754 9.47266C1.82259 9.84635 1.74512 10.236 1.74512 10.6416C1.74512 10.9743 1.79525 11.2979 1.89551 11.6123C2.00033 11.9222 2.15299 12.2093 2.35352 12.4736L1 13.834L1.61523 14.4492L2.97559 13.0957C3.23991 13.2962 3.52702 13.4489 3.83691 13.5537C4.15137 13.654 4.47493 13.7041 4.80762 13.7041C5.21322 13.7041 5.60286 13.6266 5.97656 13.4717C6.35482 13.3167 6.6875 13.0957 6.97461 12.8086L8.51953 11.2568L7.9043 10.6416ZM5.6416 12.665C5.37728 12.7744 5.09928 12.8291 4.80762 12.8291C4.50684 12.8291 4.22201 12.7721 3.95312 12.6582C3.6888 12.5443 3.45638 12.3893 3.25586 12.1934C3.0599 11.9928 2.90495 11.7604 2.79102 11.4961C2.67708 11.2272 2.62012 10.9424 2.62012 10.6416C2.62012 10.3499 2.6748 10.0719 2.78418 9.80762C2.89811 9.53874 3.05762 9.30176 3.2627 9.09668L4.19238 8.16699L7.28223 11.2568L6.35254 12.1865C6.14746 12.3916 5.91048 12.5511 5.6416 12.665Z" fill="#F48771"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.6172 3.84375C13.5169 3.5293 13.3665 3.23991 13.166 2.97559L14.5195 1.61523L13.9043 1L12.5439 2.35352C12.2796 2.15299 11.9902 2.0026 11.6758 1.90234C11.3659 1.79753 11.0446 1.74512 10.7119 1.74512C10.3063 1.74512 9.91439 1.82259 9.53613 1.97754C9.16243 2.13249 8.83203 2.35352 8.54492 2.64062L7 4.19238L11.3271 8.51953L12.8789 6.97461C13.166 6.6875 13.387 6.3571 13.542 5.9834C13.6969 5.60514 13.7744 5.21322 13.7744 4.80762C13.7744 4.47493 13.722 4.15365 13.6172 3.84375ZM12.7285 5.64844C12.6191 5.91276 12.4619 6.14746 12.2568 6.35254L11.3271 7.28223L8.2373 4.19238L9.16699 3.2627C9.37207 3.05762 9.60677 2.90039 9.87109 2.79102C10.14 2.67708 10.4202 2.62012 10.7119 2.62012C11.0127 2.62012 11.2952 2.67936 11.5596 2.79785C11.8239 2.91178 12.054 3.06901 12.25 3.26953C12.4505 3.46549 12.6077 3.69564 12.7217 3.95996C12.8402 4.22428 12.8994 4.50684 12.8994 4.80762C12.8994 5.09928 12.8424 5.37956 12.7285 5.64844ZM7.9043 10.6416L9.3877 9.09668L8.77246 8.47461L7.28223 10.0264L5.42285 8.16699L6.91309 6.61523L6.29102 6L4.80762 7.54492L4.19238 6.92969L2.64062 8.47461C2.35352 8.76172 2.13249 9.0944 1.97754 9.47266C1.82259 9.84635 1.74512 10.236 1.74512 10.6416C1.74512 10.9743 1.79525 11.2979 1.89551 11.6123C2.00033 11.9222 2.15299 12.2093 2.35352 12.4736L1 13.834L1.61523 14.4492L2.97559 13.0957C3.23991 13.2962 3.52702 13.4489 3.83691 13.5537C4.15137 13.654 4.47493 13.7041 4.80762 13.7041C5.21322 13.7041 5.60286 13.6266 5.97656 13.4717C6.35482 13.3167 6.6875 13.0957 6.97461 12.8086L8.51953 11.2568L7.9043 10.6416ZM5.6416 12.665C5.37728 12.7744 5.09928 12.8291 4.80762 12.8291C4.50684 12.8291 4.22201 12.7721 3.95312 12.6582C3.6888 12.5443 3.45638 12.3893 3.25586 12.1934C3.0599 11.9928 2.90495 11.7604 2.79102 11.4961C2.67708 11.2272 2.62012 10.9424 2.62012 10.6416C2.62012 10.3499 2.6748 10.0719 2.78418 9.80762C2.89811 9.53874 3.05762 9.30176 3.2627 9.09668L4.19238 8.16699L7.28223 11.2568L6.35254 12.1865C6.14746 12.3916 5.91048 12.5511 5.6416 12.665Z" fill="#A1260D"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.6172 3.84375C13.5169 3.5293 13.3665 3.23991 13.166 2.97559L14.5195 1.61523L13.9043 1L12.5439 2.35352C12.2796 2.15299 11.9902 2.0026 11.6758 1.90234C11.3659 1.79753 11.0446 1.74512 10.7119 1.74512C10.3063 1.74512 9.91439 1.82259 9.53613 1.97754C9.16243 2.13249 8.83203 2.35352 8.54492 2.64062L7 4.19238L11.3271 8.51953L12.8789 6.97461C13.166 6.6875 13.387 6.3571 13.542 5.9834C13.6969 5.60514 13.7744 5.21322 13.7744 4.80762C13.7744 4.47493 13.722 4.15365 13.6172 3.84375ZM12.7285 5.64844C12.6191 5.91276 12.4619 6.14746 12.2568 6.35254L11.3271 7.28223L8.2373 4.19238L9.16699 3.2627C9.37207 3.05762 9.60677 2.90039 9.87109 2.79102C10.14 2.67708 10.4202 2.62012 10.7119 2.62012C11.0127 2.62012 11.2952 2.67936 11.5596 2.79785C11.8239 2.91178 12.054 3.06901 12.25 3.26953C12.4505 3.46549 12.6077 3.69564 12.7217 3.95996C12.8402 4.22428 12.8994 4.50684 12.8994 4.80762C12.8994 5.09928 12.8424 5.37956 12.7285 5.64844ZM7.9043 10.6416L9.3877 9.09668L8.77246 8.47461L7.28223 10.0264L5.42285 8.16699L6.91309 6.61523L6.29102 6L4.80762 7.54492L4.19238 6.92969L2.64062 8.47461C2.35352 8.76172 2.13249 9.0944 1.97754 9.47266C1.82259 9.84635 1.74512 10.236 1.74512 10.6416C1.74512 10.9743 1.79525 11.2979 1.89551 11.6123C2.00033 11.9222 2.15299 12.2093 2.35352 12.4736L1 13.834L1.61523 14.4492L2.97559 13.0957C3.23991 13.2962 3.52702 13.4489 3.83691 13.5537C4.15137 13.654 4.47493 13.7041 4.80762 13.7041C5.21322 13.7041 5.60286 13.6266 5.97656 13.4717C6.35482 13.3167 6.6875 13.0957 6.97461 12.8086L8.51953 11.2568L7.9043 10.6416ZM5.6416 12.665C5.37728 12.7744 5.09928 12.8291 4.80762 12.8291C4.50684 12.8291 4.22201 12.7721 3.95312 12.6582C3.6888 12.5443 3.45638 12.3893 3.25586 12.1934C3.0599 11.9928 2.90495 11.7604 2.79102 11.4961C2.67708 11.2272 2.62012 10.9424 2.62012 10.6416C2.62012 10.3499 2.6748 10.0719 2.78418 9.80762C2.89811 9.53874 3.05762 9.30176 3.2627 9.09668L4.19238 8.16699L7.28223 11.2568L6.35254 12.1865C6.14746 12.3916 5.91048 12.5511 5.6416 12.665Z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1,8 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="5" y="3" width="2" height="2" fill="#848484"/>
|
||||
<rect x="5" y="7" width="2" height="2" fill="#848484"/>
|
||||
<rect x="5" y="11" width="2" height="2" fill="#848484"/>
|
||||
<rect x="9" y="3" width="2" height="2" fill="#848484"/>
|
||||
<rect x="9" y="7" width="2" height="2" fill="#848484"/>
|
||||
<rect x="9" y="11" width="2" height="2" fill="#848484"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 441 B |
@@ -11,6 +11,7 @@
|
||||
padding: 6px 10px;
|
||||
white-space: pre-wrap;
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
}
|
||||
|
||||
.monaco-editor .zone-widget .zone-widget-container.exception-widget .title {
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.5 3L6 3V13H4.5V3ZM11.5 3V13H10V3L11.5 3Z" fill="#75BEFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 174 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.5 3L6 3V13H4.5V3ZM11.5 3V13H10V3L11.5 3Z" fill="#007ACC"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 174 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.5 3L6 3V13H4.5V3ZM11.5 3V13H10V3L11.5 3Z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 174 B |
@@ -13,6 +13,8 @@
|
||||
|
||||
.repl .repl-tree .monaco-tl-contents {
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.repl .repl-tree.word-wrap .monaco-tl-contents {
|
||||
@@ -37,6 +39,16 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.repl .repl-tree .monaco-tl-contents .arrow {
|
||||
position:absolute;
|
||||
left: 2px;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.vs-dark .repl .repl-tree .monaco-tl-contents .arrow {
|
||||
opacity: 0.45;
|
||||
}
|
||||
|
||||
.repl .repl-tree .output.expression.value-and-source .source {
|
||||
margin-left: 4px;
|
||||
margin-right: 8px;
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.75 8C12.75 10.4853 10.7353 12.5 8.24999 12.5C6.41795 12.5 4.84162 11.4052 4.13953 9.83416L2.74882 10.399C3.67446 12.5186 5.78923 14 8.24999 14C11.5637 14 14.25 11.3137 14.25 8C14.25 4.68629 11.5637 2 8.24999 2C6.3169 2 4.59732 2.91418 3.5 4.3338V2.5H2V6.5L2.75 7.25H6.25V5.75H4.35201C5.13008 4.40495 6.58436 3.5 8.24999 3.5C10.7353 3.5 12.75 5.51472 12.75 8Z" fill="#89D185"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 533 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.75 8C12.75 10.4853 10.7353 12.5 8.24999 12.5C6.41795 12.5 4.84162 11.4052 4.13953 9.83416L2.74882 10.399C3.67446 12.5186 5.78923 14 8.24999 14C11.5637 14 14.25 11.3137 14.25 8C14.25 4.68629 11.5637 2 8.24999 2C6.3169 2 4.59732 2.91418 3.5 4.3338V2.5H2V6.5L2.75 7.25H6.25V5.75H4.35201C5.13008 4.40495 6.58436 3.5 8.24999 3.5C10.7353 3.5 12.75 5.51472 12.75 8Z" fill="#388A34"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 533 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.75 8C12.75 10.4853 10.7353 12.5 8.24999 12.5C6.41795 12.5 4.84162 11.4052 4.13953 9.83416L2.74882 10.399C3.67446 12.5186 5.78923 14 8.24999 14C11.5637 14 14.25 11.3137 14.25 8C14.25 4.68629 11.5637 2 8.24999 2C6.3169 2 4.59732 2.91418 3.5 4.3338V2.5H2V6.5L2.75 7.25H6.25V5.75H4.35201C5.13008 4.40495 6.58436 3.5 8.24999 3.5C10.7353 3.5 12.75 5.51472 12.75 8Z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 533 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.5 2H12V2.24001L12 14L13.5 14L13.5 2ZM10 2.18094V14L0.999998 8.06218L10 2.18094ZM3.68522 8.06218L8.49976 5L8.49976 11.1809L3.68522 8.06218Z" fill="#75BEFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 313 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.5 2H12V2.24001L12 14L13.5 14L13.5 2ZM10 2.18094V14L0.999998 8.06218L10 2.18094ZM3.68522 8.06218L8.49976 5L8.49976 11.1809L3.68522 8.06218Z" fill="#75BEFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 313 B |
@@ -1,4 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 8C10 8.39556 9.8827 8.78224 9.66294 9.11114C9.44318 9.44004 9.13082 9.69638 8.76537 9.84776C8.39992 9.99913 7.99778 10.0387 7.60982 9.96157C7.22186 9.8844 6.86549 9.69392 6.58579 9.41421C6.30608 9.13451 6.1156 8.77814 6.03843 8.39018C5.96126 8.00222 6.00087 7.60009 6.15224 7.23463C6.30362 6.86918 6.55996 6.55682 6.88886 6.33706C7.21776 6.1173 7.60444 6 8 6C8.53043 6 9.03914 6.21071 9.41421 6.58579C9.78929 6.96086 10 7.46957 10 8Z" fill="#E51400"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 3.25L4.25 2H9.30677L10.2355 2.41331L14.4986 7.14518L14.5 8.81702L10.2368 13.5647L9.30677 13.9796H4.25L3 12.7296V3.25ZM4.25 12.7296V3.25H9.30677L13.5699 7.98187L9.30677 12.7296H4.25Z" fill="#89D185"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 820 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 3.25L4.25 2H9.30677L10.2355 2.41331L14.4986 7.14518L14.5 8.81702L10.2368 13.5647L9.30677 13.9796H4.25L3 12.7296V3.25ZM4.25 12.7296V3.25H9.30677L13.5699 7.98187L9.30677 12.7296H4.25Z" fill="#89D185"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 355 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.99976 14V2.18091L12.9998 8.06215L3.99976 14ZM5.49999 4.99997L10.3145 8.06215L5.49999 11.1809L5.49999 4.99997Z" fill="#89D185"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 283 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.99976 14V2.18091L12.9998 8.06215L3.99976 14ZM5.49999 4.99997L10.3145 8.06215L5.49999 11.1809L5.49999 4.99997Z" fill="#89D185"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 283 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.99976 14V2.18091L12.9998 8.06215L3.99976 14ZM5.49999 4.99997L10.3145 8.06215L5.49999 11.1809L5.49999 4.99997Z" fill="#388A34"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 283 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.75 5.75V1.75H3.25V4.2916C4.39501 2.93303 6.16099 2.08334 8.09083 2.08334C11.2668 2.08334 14.0106 4.39036 14.2493 7.48075L14.2701 7.75H12.769L12.7471 7.5241C12.5346 5.32932 10.5449 3.58334 8.09083 3.58334C6.35478 3.58334 4.84718 4.45925 4.04125 5.75H6.87012V7.25H2.708L1.74652 6.27493V5.75H1.75ZM8 14C6.89543 14 6 13.1046 6 12C6 10.8954 6.89543 10 8 10C9.10457 10 10 10.8954 10 12C10 13.1046 9.10457 14 8 14Z" fill="#75BEFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 581 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.75 5.75V1.75H3.25V4.2916C4.39501 2.93303 6.16099 2.08334 8.09083 2.08334C11.2668 2.08334 14.0106 4.39036 14.2493 7.48075L14.2701 7.75H12.769L12.7471 7.5241C12.5346 5.32932 10.5449 3.58334 8.09083 3.58334C6.35478 3.58334 4.84718 4.45925 4.04125 5.75H6.87012V7.25H2.708L1.74652 6.27493V5.75H1.75ZM8 14C6.89543 14 6 13.1046 6 12C6 10.8954 6.89543 10 8 10C9.10457 10 10 10.8954 10 12C10 13.1046 9.10457 14 8 14Z" fill="#007ACC"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 581 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00001 9.532H8.54201L12.447 5.627L11.386 4.567L8.74901 7.177L8.74901 1H8.00001H7.25101L7.25101 7.177L4.61401 4.567L3.55301 5.627L7.45801 9.532H8.00001ZM9.95601 13.013C9.95601 14.1176 9.06058 15.013 7.95601 15.013C6.85144 15.013 5.95601 14.1176 5.95601 13.013C5.95601 11.9084 6.85144 11.013 7.95601 11.013C9.06058 11.013 9.95601 11.9084 9.95601 13.013Z" fill="#75BEFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 524 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00001 9.532H8.54201L12.447 5.627L11.386 4.567L8.74901 7.177L8.74901 1H8.00001H7.25101L7.25101 7.177L4.61401 4.567L3.55301 5.627L7.45801 9.532H8.00001ZM9.95601 13.013C9.95601 14.1176 9.06058 15.013 7.95601 15.013C6.85144 15.013 5.95601 14.1176 5.95601 13.013C5.95601 11.9084 6.85144 11.013 7.95601 11.013C9.06058 11.013 9.95601 11.9084 9.95601 13.013Z" fill="#007ACC"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 524 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00001 9.532H8.54201L12.447 5.627L11.386 4.567L8.74901 7.177L8.74901 1H8.00001H7.25101L7.25101 7.177L4.61401 4.567L3.55301 5.627L7.45801 9.532H8.00001ZM9.95601 13.013C9.95601 14.1176 9.06058 15.013 7.95601 15.013C6.85144 15.013 5.95601 14.1176 5.95601 13.013C5.95601 11.9084 6.85144 11.013 7.95601 11.013C9.06058 11.013 9.95601 11.9084 9.95601 13.013Z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 524 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00001 1H7.45801L3.55301 4.905L4.61401 5.965L7.25101 3.355V9.532H8.00001H8.74901V3.355L11.386 5.965L12.447 4.905L8.54201 1H8.00001ZM9.95601 13.013C9.95601 14.1176 9.06058 15.013 7.95601 15.013C6.85144 15.013 5.95601 14.1176 5.95601 13.013C5.95601 11.9084 6.85144 11.013 7.95601 11.013C9.06058 11.013 9.95601 11.9084 9.95601 13.013Z" fill="#75BEFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 504 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00001 1H7.45801L3.55301 4.905L4.61401 5.965L7.25101 3.355V9.532H8.00001H8.74901V3.355L11.386 5.965L12.447 4.905L8.54201 1H8.00001ZM9.95601 13.013C9.95601 14.1176 9.06058 15.013 7.95601 15.013C6.85144 15.013 5.95601 14.1176 5.95601 13.013C5.95601 11.9084 6.85144 11.013 7.95601 11.013C9.06058 11.013 9.95601 11.9084 9.95601 13.013Z" fill="#007ACC"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 504 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00001 1H7.45801L3.55301 4.905L4.61401 5.965L7.25101 3.355V9.532H8.00001H8.74901V3.355L11.386 5.965L12.447 4.905L8.54201 1H8.00001ZM9.95601 13.013C9.95601 14.1176 9.06058 15.013 7.95601 15.013C6.85144 15.013 5.95601 14.1176 5.95601 13.013C5.95601 11.9084 6.85144 11.013 7.95601 11.013C9.06058 11.013 9.95601 11.9084 9.95601 13.013Z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 504 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 5.75V1.75H12.75V4.2916C11.605 2.93303 9.83901 2.08334 7.90917 2.08334C4.73318 2.08334 1.98943 4.39036 1.75074 7.48075L1.72994 7.75H3.23102L3.2529 7.5241C3.46544 5.32932 5.45511 3.58334 7.90917 3.58334C9.64522 3.58334 11.1528 4.45925 11.9587 5.75H9.12988V7.25H13.292L14.2535 6.27493V5.75H14.25ZM8 14C9.10457 14 10 13.1046 10 12C10 10.8954 9.10457 10 8 10C6.89543 10 6 10.8954 6 12C6 13.1046 6.89543 14 8 14Z" fill="#75BEFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 584 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 5.75V1.75H12.75V4.2916C11.605 2.93303 9.83901 2.08334 7.90917 2.08334C4.73318 2.08334 1.98943 4.39036 1.75074 7.48075L1.72994 7.75H3.23102L3.2529 7.5241C3.46544 5.32932 5.45511 3.58334 7.90917 3.58334C9.64522 3.58334 11.1528 4.45925 11.9587 5.75H9.12988V7.25H13.292L14.2535 6.27493V5.75H14.25ZM8 14C9.10457 14 10 13.1046 10 12C10 10.8954 9.10457 10 8 10C6.89543 10 6 10.8954 6 12C6 13.1046 6.89543 14 8 14Z" fill="#007ACC"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 584 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 5.75V1.75H12.75V4.2916C11.605 2.93303 9.83901 2.08334 7.90917 2.08334C4.73318 2.08334 1.98943 4.39036 1.75074 7.48075L1.72994 7.75H3.23102L3.2529 7.5241C3.46544 5.32932 5.45511 3.58334 7.90917 3.58334C9.64522 3.58334 11.1528 4.45925 11.9587 5.75H9.12988V7.25H13.292L14.2535 6.27493V5.75H14.25ZM8 14C9.10457 14 10 13.1046 10 12C10 10.8954 9.10457 10 8 10C6.89543 10 6 10.8954 6 12C6 13.1046 6.89543 14 8 14Z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 584 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.625" y="2.625" width="10.75" height="10.75" stroke="#F48771" stroke-width="1.25"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 197 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.625" y="2.625" width="10.75" height="10.75" stroke="#F48771" stroke-width="1.25"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 197 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.625" y="2.625" width="10.75" height="10.75" stroke="#FFFFFF" stroke-width="1.25"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 197 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.9991 5.5009C15.0303 6.61917 14.6339 7.70727 13.8907 8.54341C13.1475 9.37954 12.1133 9.90079 10.9991 10.0009C10.9909 9.65849 10.9232 9.32013 10.7991 9.00089C11.6689 8.91145 12.4755 8.50547 13.0655 7.86015C13.6555 7.21484 13.9878 6.3752 13.9991 5.5009C13.9958 4.599 13.6452 3.73303 13.0201 3.08292C12.3949 2.4328 11.5434 2.04852 10.6423 2.0099C9.74123 1.97128 8.85991 2.2813 8.18146 2.87555C7.503 3.4698 7.07956 4.30258 6.99912 5.20089C6.67714 5.08647 6.34034 5.01911 5.99912 5.0009C6.14758 3.90649 6.68302 2.90142 7.50848 2.16768C8.33394 1.43393 9.39486 1.02002 10.4991 1.00089C11.0908 0.998381 11.6771 1.11306 12.2242 1.33832C12.7713 1.56357 13.2683 1.89494 13.6867 2.31331C14.1051 2.73167 14.4364 3.22875 14.6617 3.77585C14.887 4.32295 15.0016 4.90924 14.9991 5.5009ZM5.49912 6.0009C4.60911 6.0009 3.73908 6.26482 2.99906 6.75928C2.25904 7.25375 1.68226 7.95655 1.34166 8.77882C1.00107 9.60109 0.911955 10.5059 1.08559 11.3788C1.25922 12.2517 1.68781 13.0535 2.31714 13.6829C2.94648 14.3122 3.7483 14.7408 4.62122 14.9144C5.49413 15.0881 6.39893 14.9989 7.2212 14.6584C8.04347 14.3178 8.74627 13.741 9.24074 13.001C9.7352 12.2609 9.99912 11.3909 9.99912 10.5009C9.99912 9.90995 9.88273 9.32478 9.65658 8.77882C9.43044 8.23285 9.09897 7.73678 8.6811 7.31891C8.26324 6.90105 7.76716 6.56958 7.2212 6.34344C6.67523 6.11729 6.09007 6.0009 5.49912 6.0009Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.9991 5.5009C15.0303 6.61917 14.6339 7.70727 13.8907 8.54341C13.1475 9.37954 12.1133 9.90079 10.9991 10.0009C10.9909 9.65849 10.9232 9.32013 10.7991 9.00089C11.6689 8.91145 12.4755 8.50547 13.0655 7.86015C13.6555 7.21484 13.9878 6.3752 13.9991 5.5009C13.9958 4.599 13.6452 3.73303 13.0201 3.08292C12.3949 2.4328 11.5434 2.04852 10.6423 2.0099C9.74123 1.97128 8.85991 2.2813 8.18146 2.87555C7.503 3.4698 7.07956 4.30258 6.99912 5.20089C6.67714 5.08647 6.34034 5.01911 5.99912 5.0009C6.14758 3.90649 6.68302 2.90142 7.50848 2.16768C8.33394 1.43393 9.39486 1.02002 10.4991 1.00089C11.0908 0.998381 11.6771 1.11306 12.2242 1.33832C12.7713 1.56357 13.2683 1.89494 13.6867 2.31331C14.1051 2.73167 14.4364 3.22875 14.6617 3.77585C14.887 4.32295 15.0016 4.90924 14.9991 5.5009ZM5.49912 6.0009C4.60911 6.0009 3.73908 6.26482 2.99906 6.75928C2.25904 7.25375 1.68226 7.95655 1.34166 8.77882C1.00107 9.60109 0.911955 10.5059 1.08559 11.3788C1.25922 12.2517 1.68781 13.0535 2.31714 13.6829C2.94648 14.3122 3.7483 14.7408 4.62122 14.9144C5.49413 15.0881 6.39893 14.9989 7.2212 14.6584C8.04347 14.3178 8.74627 13.741 9.24074 13.001C9.7352 12.2609 9.99912 11.3909 9.99912 10.5009C9.99912 9.90995 9.88273 9.32478 9.65658 8.77882C9.43044 8.23285 9.09897 7.73678 8.6811 7.31891C8.26324 6.90105 7.76716 6.56958 7.2212 6.34344C6.67523 6.11729 6.09007 6.0009 5.49912 6.0009Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.9991 5.5009C15.0303 6.61917 14.6339 7.70727 13.8907 8.54341C13.1475 9.37954 12.1133 9.90079 10.9991 10.0009C10.9909 9.65849 10.9232 9.32013 10.7991 9.00089C11.6689 8.91145 12.4755 8.50547 13.0655 7.86015C13.6555 7.21484 13.9878 6.3752 13.9991 5.5009C13.9958 4.599 13.6452 3.73303 13.0201 3.08292C12.3949 2.4328 11.5434 2.04852 10.6423 2.0099C9.74123 1.97128 8.85991 2.2813 8.18146 2.87555C7.503 3.4698 7.07956 4.30258 6.99912 5.20089C6.67714 5.08647 6.34034 5.01911 5.99912 5.0009C6.14758 3.90649 6.68302 2.90142 7.50848 2.16768C8.33394 1.43393 9.39486 1.02002 10.4991 1.00089C11.0908 0.998381 11.6771 1.11306 12.2242 1.33832C12.7713 1.56357 13.2683 1.89494 13.6867 2.31331C14.1051 2.73167 14.4364 3.22875 14.6617 3.77585C14.887 4.32295 15.0016 4.90924 14.9991 5.5009ZM5.49912 6.0009C4.60911 6.0009 3.73908 6.26482 2.99906 6.75928C2.25904 7.25375 1.68226 7.95655 1.34166 8.77882C1.00107 9.60109 0.911955 10.5059 1.08559 11.3788C1.25922 12.2517 1.68781 13.0535 2.31714 13.6829C2.94648 14.3122 3.7483 14.7408 4.62122 14.9144C5.49413 15.0881 6.39893 14.9989 7.2212 14.6584C8.04347 14.3178 8.74627 13.741 9.24074 13.001C9.7352 12.2609 9.99912 11.3909 9.99912 10.5009C9.99912 9.90995 9.88273 9.32478 9.65658 8.77882C9.43044 8.23285 9.09897 7.73678 8.6811 7.31891C8.26324 6.90105 7.76716 6.56958 7.2212 6.34344C6.67523 6.11729 6.09007 6.0009 5.49912 6.0009Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -63,6 +63,7 @@ import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
import { FuzzyScore, createMatches } from 'vs/base/common/filters';
|
||||
import { HighlightedLabel, IHighlight } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { PANEL_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
@@ -344,7 +345,7 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
this.replInput.focus();
|
||||
setTimeout(() => this.replInput.focus(), 0);
|
||||
}
|
||||
|
||||
getActionViewItem(action: IAction): IActionViewItem | undefined {
|
||||
@@ -406,7 +407,7 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati
|
||||
const wordWrap = this.configurationService.getValue<IDebugConfiguration>('debug').console.wordWrap;
|
||||
dom.toggleClass(treeContainer, 'word-wrap', wordWrap);
|
||||
const linkDetector = this.instantiationService.createInstance(LinkDetector);
|
||||
this.tree = this.instantiationService.createInstance(
|
||||
this.tree = this.instantiationService.createInstance<typeof WorkbenchAsyncDataTree, WorkbenchAsyncDataTree<IDebugSession, IReplElement, FuzzyScore>>(
|
||||
WorkbenchAsyncDataTree,
|
||||
'DebugRepl',
|
||||
treeContainer,
|
||||
@@ -428,7 +429,10 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati
|
||||
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IReplElement) => e },
|
||||
horizontalScrolling: !wordWrap,
|
||||
setRowLineHeight: false,
|
||||
supportDynamicHeights: wordWrap
|
||||
supportDynamicHeights: wordWrap,
|
||||
overrideStyles: {
|
||||
listBackground: PANEL_BACKGROUND
|
||||
}
|
||||
});
|
||||
this._register(this.tree.onContextMenu(e => this.onContextMenu(e)));
|
||||
let lastSelectedString: string;
|
||||
@@ -606,6 +610,7 @@ class ReplEvaluationInputsRenderer implements ITreeRenderer<ReplEvaluationInput,
|
||||
}
|
||||
|
||||
renderTemplate(container: HTMLElement): IReplEvaluationInputTemplateData {
|
||||
dom.append(container, $('span.arrow.codicon.codicon-arrow-small-right'));
|
||||
const input = dom.append(container, $('.expression'));
|
||||
const label = new HighlightedLabel(input, false);
|
||||
return { label };
|
||||
@@ -631,6 +636,7 @@ class ReplEvaluationResultsRenderer implements ITreeRenderer<ReplEvaluationResul
|
||||
constructor(private readonly linkDetector: LinkDetector) { }
|
||||
|
||||
renderTemplate(container: HTMLElement): IReplEvaluationResultTemplateData {
|
||||
dom.append(container, $('span.arrow.codicon.codicon-arrow-small-left'));
|
||||
const output = dom.append(container, $('.evaluation-result.expression'));
|
||||
const value = dom.append(output, $('span.value'));
|
||||
const annotation = dom.append(output, $('span'));
|
||||
@@ -805,13 +811,13 @@ class ReplDelegate extends CachedListVirtualDelegate<IReplElement> {
|
||||
const config = this.configurationService.getValue<IDebugConfiguration>('debug');
|
||||
|
||||
if (!config.console.wordWrap) {
|
||||
return Math.ceil(1.4 * config.console.fontSize);
|
||||
return this.estimateHeight(element, true);
|
||||
}
|
||||
|
||||
return super.getHeight(element);
|
||||
}
|
||||
|
||||
protected estimateHeight(element: IReplElement): number {
|
||||
protected estimateHeight(element: IReplElement, ignoreValueLength = false): number {
|
||||
const config = this.configurationService.getValue<IDebugConfiguration>('debug');
|
||||
const rowHeight = Math.ceil(1.4 * config.console.fontSize);
|
||||
const countNumberOfLines = (str: string) => Math.max(1, (str && str.match(/\r\n|\n/g) || []).length);
|
||||
@@ -821,7 +827,7 @@ class ReplDelegate extends CachedListVirtualDelegate<IReplElement> {
|
||||
// For every 30 characters increase the number of lines needed
|
||||
if (hasValue(element)) {
|
||||
let value = element.value;
|
||||
let valueRows = countNumberOfLines(value) + Math.floor(value.length / 30);
|
||||
let valueRows = countNumberOfLines(value) + (ignoreValueLength ? 0 : Math.floor(value.length / 30));
|
||||
|
||||
return valueRows * rowHeight;
|
||||
}
|
||||
|
||||
156
src/vs/workbench/contrib/debug/browser/startView.ts
Normal file
@@ -0,0 +1,156 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import { Button } from 'vs/base/browser/ui/button/button';
|
||||
import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet';
|
||||
import { attachButtonStyler } from 'vs/platform/theme/common/styler';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ViewletPane, IViewletPaneOptions } from 'vs/workbench/browser/parts/views/paneViewlet';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { localize } from 'vs/nls';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { StartAction, RunAction, ConfigureAction } from 'vs/workbench/contrib/debug/browser/debugActions';
|
||||
import { IDebugService } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
|
||||
import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { equals } from 'vs/base/common/arrays';
|
||||
const $ = dom.$;
|
||||
|
||||
export class StartView extends ViewletPane {
|
||||
|
||||
static ID = 'workbench.debug.startView';
|
||||
static LABEL = localize('start', "Start");
|
||||
|
||||
private debugButton!: Button;
|
||||
private runButton!: Button;
|
||||
private firstMessageContainer!: HTMLElement;
|
||||
private secondMessageContainer!: HTMLElement;
|
||||
private debuggerLabels: string[] | undefined = undefined;
|
||||
|
||||
constructor(
|
||||
options: IViewletViewOptions,
|
||||
@IThemeService private readonly themeService: IThemeService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@ICommandService private readonly commandService: ICommandService,
|
||||
@IDebugService private readonly debugService: IDebugService,
|
||||
@IEditorService private readonly editorService: IEditorService,
|
||||
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
|
||||
@IFileDialogService private readonly dialogService: IFileDialogService
|
||||
) {
|
||||
super({ ...(options as IViewletPaneOptions), ariaHeaderLabel: localize('debugStart', "Debug Start Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
this._register(editorService.onDidActiveEditorChange(() => this.updateView()));
|
||||
this._register(this.debugService.getConfigurationManager().onDidRegisterDebugger(() => this.updateView()));
|
||||
}
|
||||
|
||||
private updateView(): void {
|
||||
const activeEditor = this.editorService.activeTextEditorWidget;
|
||||
const debuggerLabels = this.debugService.getConfigurationManager().getDebuggerLabelsForEditor(activeEditor);
|
||||
if (!equals(this.debuggerLabels, debuggerLabels)) {
|
||||
this.debuggerLabels = debuggerLabels;
|
||||
const enabled = this.debuggerLabels.length > 0;
|
||||
|
||||
this.debugButton.enabled = enabled;
|
||||
this.runButton.enabled = enabled;
|
||||
this.debugButton.label = this.debuggerLabels.length !== 1 ? localize('debug', "Debug") : localize('debugWith', "Debug with {0}", this.debuggerLabels[0]);
|
||||
this.runButton.label = this.debuggerLabels.length !== 1 ? localize('run', "Run") : localize('runWith', "Run with {0}", this.debuggerLabels[0]);
|
||||
|
||||
const emptyWorkbench = this.workspaceContextService.getWorkbenchState() === WorkbenchState.EMPTY;
|
||||
this.firstMessageContainer.innerHTML = '';
|
||||
this.secondMessageContainer.innerHTML = '';
|
||||
const secondMessageElement = $('span');
|
||||
this.secondMessageContainer.appendChild(secondMessageElement);
|
||||
|
||||
const setSecondMessage = () => {
|
||||
secondMessageElement.textContent = localize('specifyHowToRun', "To futher configure Debug and Run");
|
||||
const clickElement = $('span.click');
|
||||
clickElement.textContent = localize('configure', " create a launch.json file.");
|
||||
clickElement.onclick = () => this.commandService.executeCommand(ConfigureAction.ID);
|
||||
this.secondMessageContainer.appendChild(clickElement);
|
||||
};
|
||||
const setSecondMessageWithFolder = () => {
|
||||
secondMessageElement.textContent = localize('noLaunchConfiguration', "To futher configure Debug and Run, ");
|
||||
const clickElement = $('span.click');
|
||||
clickElement.textContent = localize('openFolder', " open a folder");
|
||||
clickElement.onclick = () => this.dialogService.pickFolderAndOpen({ forceNewWindow: false });
|
||||
this.secondMessageContainer.appendChild(clickElement);
|
||||
|
||||
const moreText = $('span.moreText');
|
||||
moreText.textContent = localize('andconfigure', " and create a launch.json file.");
|
||||
this.secondMessageContainer.appendChild(moreText);
|
||||
};
|
||||
|
||||
if (enabled && !emptyWorkbench) {
|
||||
setSecondMessage();
|
||||
}
|
||||
|
||||
if (enabled && emptyWorkbench) {
|
||||
setSecondMessageWithFolder();
|
||||
}
|
||||
|
||||
if (!enabled && !emptyWorkbench) {
|
||||
const firstMessageElement = $('span');
|
||||
this.firstMessageContainer.appendChild(firstMessageElement);
|
||||
firstMessageElement.textContent = localize('simplyDebugAndRun', "Open a file which can be debugged or run.");
|
||||
|
||||
setSecondMessage();
|
||||
}
|
||||
|
||||
if (!enabled && emptyWorkbench) {
|
||||
const clickElement = $('span.click');
|
||||
clickElement.textContent = localize('openFile', "Open a file");
|
||||
clickElement.onclick = () => this.dialogService.pickFileAndOpen({ forceNewWindow: false });
|
||||
|
||||
this.firstMessageContainer.appendChild(clickElement);
|
||||
const firstMessageElement = $('span');
|
||||
this.firstMessageContainer.appendChild(firstMessageElement);
|
||||
firstMessageElement.textContent = localize('canBeDebuggedOrRun', " which can be debugged or run.");
|
||||
|
||||
|
||||
setSecondMessageWithFolder();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected renderBody(container: HTMLElement): void {
|
||||
this.firstMessageContainer = $('.top-section');
|
||||
container.appendChild(this.firstMessageContainer);
|
||||
|
||||
this.debugButton = new Button(container);
|
||||
this._register(this.debugButton.onDidClick(() => {
|
||||
this.commandService.executeCommand(StartAction.ID);
|
||||
}));
|
||||
attachButtonStyler(this.debugButton, this.themeService);
|
||||
|
||||
this.runButton = new Button(container);
|
||||
this.runButton.label = localize('run', "Run");
|
||||
|
||||
dom.addClass(container, 'debug-start-view');
|
||||
this._register(this.runButton.onDidClick(() => {
|
||||
this.commandService.executeCommand(RunAction.ID);
|
||||
}));
|
||||
attachButtonStyler(this.runButton, this.themeService);
|
||||
|
||||
this.secondMessageContainer = $('.section');
|
||||
container.appendChild(this.secondMessageContainer);
|
||||
|
||||
this.updateView();
|
||||
}
|
||||
|
||||
protected layoutBody(_: number, __: number): void {
|
||||
// no-op
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
this.runButton.focus();
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import { IAction, Action } from 'vs/base/common/actions';
|
||||
import { CopyValueAction } from 'vs/workbench/contrib/debug/browser/debugActions';
|
||||
import { Separator } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IViewletPanelOptions, ViewletPanel } from 'vs/workbench/browser/parts/views/panelViewlet';
|
||||
import { IViewletPaneOptions, ViewletPane } from 'vs/workbench/browser/parts/views/paneViewlet';
|
||||
import { IAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
|
||||
import { ITreeRenderer, ITreeNode, ITreeMouseEvent, ITreeContextMenuEvent, IAsyncDataSource } from 'vs/base/browser/ui/tree/tree';
|
||||
@@ -30,13 +30,14 @@ import { HighlightedLabel, IHighlight } from 'vs/base/browser/ui/highlightedlabe
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { dispose } from 'vs/base/common/lifecycle';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
|
||||
const $ = dom.$;
|
||||
let forgetScopes = true;
|
||||
|
||||
export const variableSetEmitter = new Emitter<void>();
|
||||
|
||||
export class VariablesView extends ViewletPanel {
|
||||
export class VariablesView extends ViewletPane {
|
||||
|
||||
private onFocusStackFrameScheduler: RunOnceScheduler;
|
||||
private needsRefresh = false;
|
||||
@@ -53,7 +54,7 @@ export class VariablesView extends ViewletPanel {
|
||||
@IClipboardService private readonly clipboardService: IClipboardService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService
|
||||
) {
|
||||
super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
super({ ...(options as IViewletPaneOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
|
||||
// Use scheduler to prevent unnecessary flashing
|
||||
this.onFocusStackFrameScheduler = new RunOnceScheduler(async () => {
|
||||
@@ -85,13 +86,16 @@ export class VariablesView extends ViewletPanel {
|
||||
dom.addClass(container, 'debug-variables');
|
||||
const treeContainer = renderViewTree(container);
|
||||
|
||||
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'VariablesView', treeContainer, new VariablesDelegate(),
|
||||
this.tree = this.instantiationService.createInstance<typeof WorkbenchAsyncDataTree, WorkbenchAsyncDataTree<IViewModel | IExpression | IScope, IExpression | IScope, FuzzyScore>>(WorkbenchAsyncDataTree, 'VariablesView', treeContainer, new VariablesDelegate(),
|
||||
[this.instantiationService.createInstance(VariablesRenderer), new ScopesRenderer()],
|
||||
new VariablesDataSource(), {
|
||||
ariaLabel: nls.localize('variablesAriaTreeLabel', "Debug Variables"),
|
||||
accessibilityProvider: new VariablesAccessibilityProvider(),
|
||||
identityProvider: { getId: (element: IExpression | IScope) => element.getId() },
|
||||
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression | IScope) => e }
|
||||
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression | IScope) => e },
|
||||
overrideStyles: {
|
||||
listBackground: SIDE_BAR_BACKGROUND
|
||||
}
|
||||
});
|
||||
|
||||
this.tree.setInput(this.debugService.getViewModel());
|
||||
@@ -99,7 +103,7 @@ export class VariablesView extends ViewletPanel {
|
||||
CONTEXT_VARIABLES_FOCUSED.bindTo(this.tree.contextKeyService);
|
||||
|
||||
if (this.toolbar) {
|
||||
const collapseAction = new CollapseAction(this.tree, true, 'explorer-action collapse-explorer');
|
||||
const collapseAction = new CollapseAction(this.tree, true, 'explorer-action codicon-collapse-all');
|
||||
this.toolbar.setActions([collapseAction])();
|
||||
}
|
||||
this.tree.updateChildren();
|
||||
|
||||
@@ -18,7 +18,7 @@ import { IAction, Action } from 'vs/base/common/actions';
|
||||
import { Separator } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { renderExpressionValue, renderViewTree, IInputBoxOptions, AbstractExpressionsRenderer, IExpressionTemplateData } from 'vs/workbench/contrib/debug/browser/baseDebugView';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IViewletPanelOptions, ViewletPanel } from 'vs/workbench/browser/parts/views/panelViewlet';
|
||||
import { IViewletPaneOptions, ViewletPane } from 'vs/workbench/browser/parts/views/paneViewlet';
|
||||
import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
|
||||
import { IAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService';
|
||||
@@ -30,10 +30,11 @@ import { IHighlight } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel
|
||||
import { variableSetEmitter, VariablesRenderer } from 'vs/workbench/contrib/debug/browser/variablesView';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { dispose } from 'vs/base/common/lifecycle';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
|
||||
const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024;
|
||||
|
||||
export class WatchExpressionsView extends ViewletPanel {
|
||||
export class WatchExpressionsView extends ViewletPane {
|
||||
|
||||
private onWatchExpressionsUpdatedScheduler: RunOnceScheduler;
|
||||
private needsRefresh = false;
|
||||
@@ -48,7 +49,7 @@ export class WatchExpressionsView extends ViewletPanel {
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
) {
|
||||
super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('watchExpressionsSection', "Watch Expressions Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
super({ ...(options as IViewletPaneOptions), ariaHeaderLabel: nls.localize('watchExpressionsSection', "Watch Expressions Section") }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
|
||||
this.onWatchExpressionsUpdatedScheduler = new RunOnceScheduler(() => {
|
||||
this.needsRefresh = false;
|
||||
@@ -61,13 +62,16 @@ export class WatchExpressionsView extends ViewletPanel {
|
||||
const treeContainer = renderViewTree(container);
|
||||
|
||||
const expressionsRenderer = this.instantiationService.createInstance(WatchExpressionsRenderer);
|
||||
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'WatchExpressions', treeContainer, new WatchExpressionsDelegate(), [expressionsRenderer, this.instantiationService.createInstance(VariablesRenderer)],
|
||||
this.tree = this.instantiationService.createInstance<typeof WorkbenchAsyncDataTree, WorkbenchAsyncDataTree<IDebugService | IExpression, IExpression, FuzzyScore>>(WorkbenchAsyncDataTree, 'WatchExpressions', treeContainer, new WatchExpressionsDelegate(), [expressionsRenderer, this.instantiationService.createInstance(VariablesRenderer)],
|
||||
new WatchExpressionsDataSource(), {
|
||||
ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'watchAriaTreeLabel' }, "Debug Watch Expressions"),
|
||||
accessibilityProvider: new WatchExpressionsAccessibilityProvider(),
|
||||
identityProvider: { getId: (element: IExpression) => element.getId() },
|
||||
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression) => e },
|
||||
dnd: new WatchExpressionsDragAndDrop(this.debugService),
|
||||
overrideStyles: {
|
||||
listBackground: SIDE_BAR_BACKGROUND
|
||||
}
|
||||
});
|
||||
|
||||
this.tree.setInput(this.debugService);
|
||||
@@ -75,18 +79,21 @@ export class WatchExpressionsView extends ViewletPanel {
|
||||
|
||||
if (this.toolbar) {
|
||||
const addWatchExpressionAction = new AddWatchExpressionAction(AddWatchExpressionAction.ID, AddWatchExpressionAction.LABEL, this.debugService, this.keybindingService);
|
||||
const collapseAction = new CollapseAction(this.tree, true, 'explorer-action collapse-explorer');
|
||||
const collapseAction = new CollapseAction(this.tree, true, 'explorer-action codicon-collapse-all');
|
||||
const removeAllWatchExpressionsAction = new RemoveAllWatchExpressionsAction(RemoveAllWatchExpressionsAction.ID, RemoveAllWatchExpressionsAction.LABEL, this.debugService, this.keybindingService);
|
||||
this.toolbar.setActions([addWatchExpressionAction, collapseAction, removeAllWatchExpressionsAction])();
|
||||
}
|
||||
|
||||
this._register(this.tree.onContextMenu(e => this.onContextMenu(e)));
|
||||
this._register(this.tree.onMouseDblClick(e => this.onMouseDblClick(e)));
|
||||
this._register(this.debugService.getModel().onDidChangeWatchExpressions(we => {
|
||||
this._register(this.debugService.getModel().onDidChangeWatchExpressions(async we => {
|
||||
if (!this.isBodyVisible()) {
|
||||
this.needsRefresh = true;
|
||||
} else {
|
||||
this.tree.updateChildren();
|
||||
await this.tree.updateChildren();
|
||||
if (we instanceof Expression) {
|
||||
this.tree.reveal(we);
|
||||
}
|
||||
}
|
||||
}));
|
||||
this._register(this.debugService.getViewModel().onDidFocusStackFrame(() => {
|
||||
|
||||
@@ -18,13 +18,11 @@ export abstract class AbstractDebugAdapter implements IDebugAdapter {
|
||||
private requestCallback: ((request: DebugProtocol.Request) => void) | undefined;
|
||||
private eventCallback: ((request: DebugProtocol.Event) => void) | undefined;
|
||||
private messageCallback: ((message: DebugProtocol.ProtocolMessage) => void) | undefined;
|
||||
protected readonly _onError: Emitter<Error>;
|
||||
protected readonly _onExit: Emitter<number | null>;
|
||||
protected readonly _onError = new Emitter<Error>();
|
||||
protected readonly _onExit = new Emitter<number | null>();
|
||||
|
||||
constructor() {
|
||||
this.sequence = 1;
|
||||
this._onError = new Emitter<Error>();
|
||||
this._onExit = new Emitter<number>();
|
||||
}
|
||||
|
||||
abstract startSession(): Promise<void>;
|
||||
|
||||