Skip to content

Commit

Permalink
feat: contribute to welcome view
Browse files Browse the repository at this point in the history
  • Loading branch information
connor4312 committed Mar 6, 2020
1 parent 4e9b70d commit 9e6dc67
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@
}
]
},
"viewsWelcome": [
{
"view": "debug",
"contents": "%debug.terminal.welcome%",
"when": "debugStartLanguage == javascript || debugStartLanguage == typescript"
}
],
"commands": [
{
"command": "extension.NAMESPACE(node-debug).prettyPrint",
Expand Down
4 changes: 3 additions & 1 deletion src/build/generate-contributions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ interface IDebugger<T extends AnyLaunchConfiguration> {
label: MappedReferenceString;
program?: string;
runtime?: string;
languages?: string[];
variables?: { [key: string]: Contributions };
required?: (keyof T)[];
configurationSnippets: ({
Expand Down Expand Up @@ -523,6 +524,7 @@ const nodeTerminalConfiguration: IDebugger<ITerminalLaunchConfiguration> = {
type: DebugType.Terminal,
request: 'launch',
label: refString('debug.terminal.label'),
languages: [],
configurationSnippets: [
{
label: refString('debug.terminal.snippet.label'),
Expand Down Expand Up @@ -800,9 +802,9 @@ function buildDebuggers() {
// eslint-disable-next-line
const { request, configurationAttributes, required, ...rest } = d;
entry = {
languages: ['javascript', 'typescript', 'javascriptreact', 'typescriptreact'],
...rest,
aiKey: appInsightsKey,
languages: ['javascript', 'typescript', 'javascriptreact', 'typescriptreact'],
configurationAttributes: {},
configurationSnippets: [],
};
Expand Down
2 changes: 2 additions & 0 deletions src/build/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
import { sortKeys } from '../common/objUtils';
import { Contributions } from '../common/contributionUtils';

const strings = {
'attach.node.process': 'Attach to Node Process (preview)',
Expand Down Expand Up @@ -90,6 +91,7 @@ const strings = {
'debug.terminal.program.description':
'Command to run in the launched terminal. If not provided, the terminal will open without launching a program.',
'debug.terminal.snippet.label': 'Run "npm start" in a debug terminal',
'debug.terminal.welcome': `[Open Debug Terminal](command:${Contributions.CreateDebuggerTerminal})\n\nYou can use the JavaScript Debug Terminal to instantly debug any Node.js scripts you run.`,

'node.pauseForSourceMap.description':
'Whether to wait for source maps to load for each incoming script. This has a performance overhead, and might be safely disabled when running off of disk, so long as `rootPath` is not disabled.',
Expand Down

0 comments on commit 9e6dc67

Please sign in to comment.