diff --git a/extensions/node-debug/node-debug.azure.json b/extensions/node-debug/node-debug.azure.json index 341046b4b5c54d0af04ea9745c6ee1e333031317..5a33474bfe504323189e051f34d15f16c2c9842f 100644 --- a/extensions/node-debug/node-debug.azure.json +++ b/extensions/node-debug/node-debug.azure.json @@ -1,6 +1,6 @@ { "account": "monacobuild", "container": "debuggers", - "zip": "63e4d82/node-debug.zip", + "zip": "3fb9a7f/node-debug.zip", "output": "" } diff --git a/src/vs/base/browser/ui/messagelist/messageList.css b/src/vs/base/browser/ui/messagelist/messageList.css index a6a649d27cef54c832bde217fe9458a976c19199..068022d63a5437f024048c0e731bd60091c2ceef 100644 --- a/src/vs/base/browser/ui/messagelist/messageList.css +++ b/src/vs/base/browser/ui/messagelist/messageList.css @@ -140,10 +140,6 @@ cursor: pointer; } -.global-message-list li.message-list-entry .actions-container.multiple .message-action .action-button { - min-width: 45px; - text-align: center; -} .vs .global-message-list { background-color: #2C2C2C; } diff --git a/src/vs/base/browser/ui/messagelist/messageList.ts b/src/vs/base/browser/ui/messagelist/messageList.ts index 53f94b67d337cc74de84b00fb6a5ca64eb55b718..b1f2d388724eec8a491c1d9473e93289e2cb8566 100644 --- a/src/vs/base/browser/ui/messagelist/messageList.ts +++ b/src/vs/base/browser/ui/messagelist/messageList.ts @@ -208,7 +208,7 @@ export class MessageList { // Actions (if none provided, add one default action to hide message) let messageActions = this.getMessageActions(message); - li.div({ class: (total > 1 || delta < 0) ? 'actions-container multiple' : 'actions-container' }, (actionContainer) => { + li.div({ class: 'actions-container' }, (actionContainer) => { for (let i = messageActions.length - 1; i >= 0; i--) { let action = messageActions[i]; actionContainer.div({ class: 'message-action' }, (div) => { diff --git a/src/vs/base/common/scorer.ts b/src/vs/base/common/scorer.ts index 4126efe23d45b5f785b08eb192323ac8f4e885f6..fab544e1da0966bda5f9f4c2280d51b01e9d6a5c 100644 --- a/src/vs/base/common/scorer.ts +++ b/src/vs/base/common/scorer.ts @@ -28,6 +28,7 @@ * Character score: 1 * Same case bonus: 1 * Upper case bonus: 1 + * Consecutive match bonus: 5 * Start of word/path bonus: 7 * Start of string bonus: 8 */ @@ -48,40 +49,44 @@ export function score(target: string, query: string, cache?: {[id: string]: numb const queryLower = query.toLowerCase(); let index = 0; - let lastIndexOf = -1; + let startAt = 0; let score = 0; while (index < queryLen) { - var indexOf = targetLower.indexOf(queryLower[index], lastIndexOf + 1); + let indexOf = targetLower.indexOf(queryLower[index], startAt); if (indexOf < 0) { score = 0; // This makes sure that the query is contained in the target break; } - lastIndexOf = indexOf; - - // Character Match Bonus + // Character match bonus score += 1; - // Same Case Bonous + // Consecutive match bonus + if (startAt === indexOf) { + score += 5; + } + + // Same case bonus if (target[indexOf] === query[indexOf]) { score += 1; } - // Prefix Bonus + // Start of word bonus if (indexOf === 0) { score += 8; } - // Start of Word/Path Bonous + // After separator bonus else if (wordPathBoundary.some(w => w === target[indexOf - 1])) { score += 7; } - // Inside Word Upper Case Bonus + // Inside word upper case bonus else if (isUpper(target.charCodeAt(indexOf))) { score += 1; } + startAt = indexOf + 1; index++; } @@ -110,7 +115,7 @@ export function matches(target: string, queryLower: string): boolean { let index = 0; let lastIndexOf = -1; while (index < queryLen) { - var indexOf = targetLower.indexOf(queryLower[index], lastIndexOf + 1); + let indexOf = targetLower.indexOf(queryLower[index], lastIndexOf + 1); if (indexOf < 0) { return false; } diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index 9d06c9c800a259f1009e9d79c4945f91d4bd3db5..688b21ecac99425dac9210a5c5b592269aba9f2f 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -76,7 +76,8 @@ export class DebugActionsWidget implements wbext.IWorkbenchContribution { } private onDebugStateChange(): void { - if (this.debugService.getState() === debug.State.Inactive) { + const state = this.debugService.getState(); + if (state === debug.State.Disabled || state === debug.State.Inactive || state === debug.State.Initializing) { return this.hide(); } diff --git a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts index b07b53fbfd804adeab9a97d8e89d345f33aa0d11..95d4b3cffd6ff11cece6254c5671603fc4f5ee98 100644 --- a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts +++ b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts @@ -382,6 +382,8 @@ declare module DebugProtocol { export interface StackTraceArguments { /** Retrieve the stacktrace for this thread. */ threadId: number; + /** the index of the first frames to return; if omitted frames start at 0. */ + startFrame?: number; /** The maximum number of frames to return. If levels is not specified or 0, all frames are returned. */ levels?: number; } @@ -391,6 +393,8 @@ declare module DebugProtocol { /** The frames of the stackframe. If the array has length zero, there are no stackframes available. This means that there is no location information available. */ stackFrames: StackFrame[]; + /** The total number of frames available. */ + totalFrames?: number; }; } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 57861f34a2251f6f47e3b13edc715f7651112b63..13fa040e4c4a1c8ebb017775c135fb8dd2188f4a 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -526,8 +526,10 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService this.setStateAndEmit(debug.State.Initializing); this.clearReplExpressions(); - return this.textFileService.saveAll().then(() => this.extensionService.onReady()).then(() => this.setConfiguration(this.configurationManager.getConfigurationName())).then(() => { - + return this.textFileService.saveAll() + .then(() => this.extensionService.onReady() + .then(() => this.setConfiguration(this.configurationManager.getConfigurationName()) + .then(() => { const configuration = this.configurationManager.getConfiguration(); if (!configuration) { return this.configurationManager.openConfigFile(false).then(openend => { @@ -552,6 +554,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService return this.doCreateSession(configuration, changeViewState); } + this.setStateAndEmit(debug.State.Inactive); this.messageService.show(severity.Error, { message: errorCount > 1 ? nls.localize('preLaunchTaskErrors', "Errors detected while running the preLaunchTask '{0}'.", configuration.preLaunchTask) : errorCount === 1 ? nls.localize('preLaunchTaskError', "Error detected while running the preLaunchTask '{0}'.", configuration.preLaunchTask) : @@ -562,6 +565,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService })] }); }, (err: TaskError) => { + this.setStateAndEmit(debug.State.Inactive); if (err.code !== TaskErrors.NotConfigured) { throw err; } @@ -571,10 +575,14 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService actions: [CloseAction, this.taskService.configureAction()] }); }); + })), err => { + this.setStateAndEmit(debug.State.Inactive); + throw err; }); } private doCreateSession(configuration: debug.IConfig, changeViewState: boolean): TPromise { + this.setStateAndEmit(debug.State.Initializing); const key = this.configurationManager.getAdapter().aiKey; const telemetryInfo = Object.create(null); this.telemetryService.getTelemetryInfo().then(info => { diff --git a/src/vs/workbench/parts/debug/node/rawDebugSession.ts b/src/vs/workbench/parts/debug/node/rawDebugSession.ts index e2a11134eb02ffdb106b22e763ba973879a5e5ac..1359762e96222f264066b997965f0d5ef02f8d19 100644 --- a/src/vs/workbench/parts/debug/node/rawDebugSession.ts +++ b/src/vs/workbench/parts/debug/node/rawDebugSession.ts @@ -244,7 +244,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.IRawDebugSes if (launch.command === 'node') { stdfork.fork(launch.argv[0], launch.argv.slice(1), {}, (err, child) => { if (err) { - e(new Error(nls.localize('unableToLaunchDebugAdapter', "Unable to launch debug adapter from {0}.", launch.argv[0]))); + e(new Error(nls.localize('unableToLaunchDebugAdapter', "Unable to launch debug adapter from '{0}'.", launch.argv[0]))); } this.serverProcess = child; c(null); @@ -304,7 +304,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.IRawDebugSes if (exists) { c(null); } else { - e(new Error(nls.localize('debugAdapterBinNotFound', "DebugAdapter bin folder not found on path {0}.", this.adapter.program))); + e(new Error(nls.localize('debugAdapterBinNotFound', "Debug adapter executable '{0}' not found.", this.adapter.program))); } }); }).then(() => {