Ability to select and launch debug configuration#20979
Ability to select and launch debug configuration#20979isidorn merged 7 commits intomicrosoft:masterfrom michelkaporin:debug-launch
Conversation
|
@michelkaporin, thanks for your PR! By analyzing the history of the files in this pull request, we identified @egamma and @alexandrudima to be potential reviewers. |
|
Hi @michelkaporin, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
| @ICommandService commandService: ICommandService, | ||
| @IWorkspaceContextService contextService: IWorkspaceContextService, | ||
| @IFileService fileService: IFileService, | ||
| @IQuickOpenService quickOpenService: IQuickOpenService |
There was a problem hiding this comment.
Put private for quickOpenService
| return nls.localize('noConfigurationsMatching', "No debug configurations matching"); | ||
| } | ||
|
|
||
| return nls.localize('noConfigurationsFound', "No debug configurations found"); |
There was a problem hiding this comment.
Update label to also contain '. Please create a 'launch.json' file.'
| } | ||
| } | ||
|
|
||
| export class LaunchAction extends RunAction { |
There was a problem hiding this comment.
Extend from abstractdebugAction
| } | ||
|
|
||
| public run(): TPromise<any> { | ||
| return TPromise.as(this.quickOpenService.show('debug ')); |
There was a problem hiding this comment.
Do not wrap as promise
| } | ||
| } | ||
|
|
||
| export class LaunchAction extends RunAction { |
There was a problem hiding this comment.
Rename to SelectAndStartAction, also change the id, nls.id
| registry.registerWorkbenchAction(new SyncActionDescriptor(DisableAllBreakpointsAction, DisableAllBreakpointsAction.ID, DisableAllBreakpointsAction.LABEL), 'Debug: Disable All Breakpoints', debugCategory); | ||
| registry.registerWorkbenchAction(new SyncActionDescriptor(ClearReplAction, ClearReplAction.ID, ClearReplAction.LABEL), 'Debug: Clear Debug Console', debugCategory); | ||
| registry.registerWorkbenchAction(new SyncActionDescriptor(FocusReplAction, FocusReplAction.ID, FocusReplAction.LABEL), 'Debug: Focus Debug Console', debugCategory); | ||
| registry.registerWorkbenchAction(new SyncActionDescriptor(LaunchAction, LaunchAction.ID, LaunchAction.LABEL, null, CONTEXT_NOT_IN_DEBUG_MODE), 'Debug: Launch Configuration', debugCategory); |
There was a problem hiding this comment.
Remove null and context for now
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
| 'use strict'; |
There was a problem hiding this comment.
We no longer 'use strict', this is simply ignored
| import * as errors from 'vs/base/common/errors'; | ||
|
|
||
| class DebugEntry extends Model.QuickOpenEntry { | ||
| private debugService: IDebugService; |
There was a problem hiding this comment.
Get rid of this privates
| return false; | ||
| } | ||
| // Run selected debug configuration | ||
| this.debugService.createProcess(this.configurationName).done(undefined, errors.onUnexpectedError); |
There was a problem hiding this comment.
Do it the other way around
|
|
||
| public getResults(input: string): TPromise<Model.QuickOpenModel> { | ||
| const configurationNames = this.debugService.getConfigurationManager().getConfigurationNames() | ||
| .sort((a, b) => a.localeCompare(b)) |
|
Looks good, merging in 🍻 |
Adds 'debug' keyword similar to 'task' and 'git' to command palette.
Fixes #16613.