Merge from vscode 099a7622e6e90dbcc226e428d4e35a72cb19ecbc (#9646)

* Merge from vscode 099a7622e6e90dbcc226e428d4e35a72cb19ecbc

* fix strict
This commit is contained in:
Anthony Dresser
2020-03-16 23:16:40 -07:00
committed by GitHub
parent 81e1b9a434
commit a53b78c0c8
170 changed files with 2601 additions and 2026 deletions

View File

@@ -643,6 +643,11 @@ class ShowMoreRenderer implements ITreeRenderer<IStackFrame[], FuzzyScore, ILabe
class CallStackDelegate implements IListVirtualDelegate<CallStackItem> {
getHeight(element: CallStackItem): number {
if (element instanceof StackFrame) {
if (!element.source || !element.source.available || isDeemphasized(element)) {
return 12;
}
}
return 22;
}

View File

@@ -393,20 +393,18 @@ export class CopyValueAction extends Action {
async run(): Promise<any> {
const stackFrame = this.debugService.getViewModel().focusedStackFrame;
const session = this.debugService.getViewModel().focusedSession;
if (typeof this.value === 'string') {
return this.clipboardService.writeText(this.value);
if (!stackFrame || !session) {
return;
}
if (stackFrame && session && this.value.evaluateName) {
try {
const evaluation = await session.evaluate(this.value.evaluateName, stackFrame.frameId, this.context);
this.clipboardService.writeText(evaluation.body.result);
} catch (e) {
this.clipboardService.writeText(this.value.value);
}
} else {
this.clipboardService.writeText(this.value.value);
const context = session.capabilities.supportsClipboardContext ? 'clipboard' : this.context;
const toEvaluate = typeof this.value === 'string' ? this.value : this.value.evaluateName || this.value.value;
try {
const evaluation = await session.evaluate(toEvaluate, stackFrame.frameId, context);
this.clipboardService.writeText(evaluation.body.result);
} catch (e) {
this.clipboardService.writeText(typeof this.value === 'string' ? this.value : this.value.value);
}
}
}

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { IQuickPickSeparator } from 'vs/platform/quickinput/common/quickInput';
import { PickerQuickAccessProvider, IPickerQuickAccessItem, TriggerAction } from 'vs/platform/quickinput/common/quickAccess';
import { PickerQuickAccessProvider, IPickerQuickAccessItem, TriggerAction } from 'vs/platform/quickinput/browser/pickerQuickAccess';
import { localize } from 'vs/nls';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { IDebugService } from 'vs/workbench/contrib/debug/common/debug';
@@ -52,7 +52,7 @@ export class StartDebugQuickAccessProvider extends PickerQuickAccessProvider<IPi
highlights: { label: highlights },
buttons: [{
iconClass: 'codicon-gear',
tooltip: localize('customizeTask', "Configure Launch Configuration")
tooltip: localize('customizeLaunchConfig', "Configure Launch Configuration")
}],
trigger: () => {
config.launch.openConfigFile(false, false);

View File

@@ -83,6 +83,7 @@
.debug-pane .disabled {
opacity: 0.65;
cursor: initial;
}
/* Call stack */
@@ -163,6 +164,7 @@
.monaco-workbench .debug-pane .debug-call-stack .monaco-action-bar .action-item > .action-label {
width: 16px;
height: 100%;
line-height: 22px;
margin-right: 8px;
vertical-align: text-top;
}