Skip to content

Commit e09ccc4

Browse files
Update extension name (#84)
* Update package.json * Fix readme * update debug type name * Fix tests * Fix lint * Fix test * Update translations * revert extension id * Fix tests * fix lint * Update debug type name * Fix translations and lint * update debug type * fix lint
1 parent 5a42ab8 commit e09ccc4

17 files changed

+74
-110
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# Debugpy extension for Visual Studio Code
1+
# Python Debugger extension for Visual Studio Code
22

3-
A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marketplace.visualstudio.com/VSCode) that supports Python debugging with debugpy. debugpy provides a seamless debugging experience by allowing you to set breakpoints, step through code, inspect variables, and perform other essential debugging tasks. The debugy extension offers debugging support for various types of Python applications including scripts, web applications, remote processes, and multi-threaded processes.
3+
A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marketplace.visualstudio.com/VSCode) that supports Python debugging with debugpy. Python Debugger provides a seamless debugging experience by allowing you to set breakpoints, step through code, inspect variables, and perform other essential debugging tasks. The debugy extension offers debugging support for various types of Python applications including scripts, web applications, remote processes, and multi-threaded processes.
44

55
Note:
6-
- The Python extension offers the debugpy extension as an optional installation, including it during the setup process.
6+
- The Python extension offers the python debugger extension as an optional installation, including it during the setup process.
77
- This extension is supported for all [actively supported versions](https://devguide.python.org/#status-of-python-branches) of the Python language (i.e., Python >= 3.7).
88

99
## Usage
1010

11-
Once installed in Visual Studio Code, debugpy will be automatically activated when you open a Python file.
11+
Once installed in Visual Studio Code, python-debugger will be automatically activated when you open a Python file.
1212

13-
## Disabling the Debugpy extension
14-
If you want to disable the Debugpy extension, you can [disable this extension](https://code.visualstudio.com/docs/editor/extension-marketplace#_disable-an-extension) per workspace in Visual Studio Code.
13+
## Disabling the Python Debugger extension
14+
If you want to disable the Python Debugger extension, you can [disable this extension](https://code.visualstudio.com/docs/editor/extension-marketplace#_disable-an-extension) per workspace in Visual Studio Code.
1515

1616
## Commands
1717

1818
| Command | Description |
1919
| ---------------------- | --------------------------------- |
20-
| Debugpy: viewOutput | Show the debugpy extension output. |
21-
| Debugpy: clearCacheAndReload | Allows you to clear the global values set in the extension. |
22-
| Debugpy: debugInTerminal | Allows you to debug a simple Python file in the terminal. |
20+
| Python Debugger: viewOutput | Show the Python Debugger Extension output. |
21+
| Python Debugger: clearCacheAndReload | Allows you to clear the global values set in the extension. |
22+
| Python Debugger: debugInTerminal | Allows you to debug a simple Python file in the terminal. |
2323

2424
## Data and telemetry
2525
The Debubpy Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://privacy.microsoft.com/privacystatement) to learn more. This extension respects the `telemetry.enableTelemetry` setting which you can learn more about at https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "debugpy",
3-
"displayName": "Debugpy",
3+
"displayName": "Python Debugger",
44
"description": "Python Debugger extension using `debugpy`.",
55
"version": "2023.3.0-dev",
66
"publisher": "ms-python",
@@ -39,18 +39,18 @@
3939
"contributes": {
4040
"commands": [
4141
{
42-
"category": "Debugpy",
42+
"category": "Python Debugger",
4343
"command": "debugpy.debugInTerminal",
4444
"icon": "$(debug-alt)",
4545
"title": "%debugpy.command.debugInTerminal.title%"
4646
},
4747
{
48-
"category": "Debugpy",
48+
"category": "Python Debugger",
4949
"command": "debugpy.clearCacheAndReload",
5050
"title": "%debugpy.command.clearCacheAndReload.title%"
5151
},
5252
{
53-
"category": "Debugpy",
53+
"category": "Python Debugger",
5454
"command": "debugpy.viewOutput",
5555
"icon": {
5656
"dark": "resources/dark/repl.svg",
@@ -62,18 +62,18 @@
6262
"menus": {
6363
"commandPalette": [
6464
{
65-
"category": "Debugpy",
65+
"category": "Python Debugger",
6666
"command": "debugpy.clearCacheAndReload",
6767
"title": "%debugpy.command.clearCacheAndReload.title%"
6868
},
6969
{
70-
"category": "Debugpy",
70+
"category": "Python Debugger",
7171
"command": "debugpy.debugInTerminal",
7272
"icon": "$(debug-alt)",
7373
"title": "%debugpy.command.debugInTerminal.title%"
7474
},
7575
{
76-
"category": "Debugpy",
76+
"category": "Python Debugger",
7777
"command": "debugpy.viewOutput",
7878
"title": "%debugpy.command.viewOutput.title%"
7979
}
@@ -434,7 +434,7 @@
434434
}
435435
},
436436
"configurationSnippets": [],
437-
"label": "Debugpy",
437+
"label": "Python Debugger",
438438
"languages": [
439439
"python"
440440
],

src/extension/common/utils/localize.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ export namespace DebugConfigStrings {
1919
placeholder: l10n.t('Debug Configuration'),
2020
};
2121
export const launchJsonCompletions = {
22-
label: l10n.t('Debugpy'),
23-
description: l10n.t('Select a Debugpy debug configuration'),
22+
label: l10n.t('Python Debugger'),
23+
description: l10n.t('Select a Python Debugger debug configuration'),
2424
};
2525
export namespace file {
2626
export const snippet = {
27-
name: l10n.t('Debugpy: Current File'),
27+
name: l10n.t('Python Debugger: Current File'),
2828
};
2929
export const selectConfiguration = {
3030
label: l10n.t('Python File'),
@@ -33,7 +33,7 @@ export namespace DebugConfigStrings {
3333
}
3434
export namespace fileWithArgs {
3535
export const snippet = {
36-
name: l10n.t('Debugpy: Current File with Arguments'),
36+
name: l10n.t('Python Debugger: Current File with Arguments'),
3737
};
3838
export const selectConfiguration = {
3939
label: l10n.t('Python File with Arguments'),
@@ -42,7 +42,7 @@ export namespace DebugConfigStrings {
4242
}
4343
export namespace module {
4444
export const snippet = {
45-
name: l10n.t('Debugpy: Module'),
45+
name: l10n.t('Python Debugger: Module'),
4646
default: l10n.t('enter-your-module-name'),
4747
};
4848
export const selectConfiguration = {
@@ -58,7 +58,7 @@ export namespace DebugConfigStrings {
5858
}
5959
export namespace attach {
6060
export const snippet = {
61-
name: l10n.t('Debugpy: Remote Attach'),
61+
name: l10n.t('Python Debugger: Remote Attach'),
6262
};
6363
export const selectConfiguration = {
6464
label: l10n.t('Remote Attach'),
@@ -77,7 +77,7 @@ export namespace DebugConfigStrings {
7777
}
7878
export namespace attachPid {
7979
export const snippet = {
80-
name: l10n.t('Debugpy: Attach using Process Id'),
80+
name: l10n.t('Python Debugger: Attach using Process Id'),
8181
};
8282
export const selectConfiguration = {
8383
label: l10n.t('Attach using Process ID'),
@@ -86,7 +86,7 @@ export namespace DebugConfigStrings {
8686
}
8787
export namespace django {
8888
export const snippet = {
89-
name: l10n.t('Debugpy: Django'),
89+
name: l10n.t('Python Debugger: Django'),
9090
};
9191
export const selectConfiguration = {
9292
label: l10n.t('Django'),
@@ -102,7 +102,7 @@ export namespace DebugConfigStrings {
102102
}
103103
export namespace fastapi {
104104
export const snippet = {
105-
name: l10n.t('Debugpy: FastAPI'),
105+
name: l10n.t('Python Debugger: FastAPI'),
106106
};
107107
export const selectConfiguration = {
108108
label: l10n.t('FastAPI'),
@@ -116,21 +116,21 @@ export namespace DebugConfigStrings {
116116
}
117117
export namespace flask {
118118
export const snippet = {
119-
name: l10n.t('Debugpy: Flask'),
119+
name: l10n.t('Python Debugger: Flask'),
120120
};
121121
export const selectConfiguration = {
122122
label: l10n.t('Flask'),
123123
description: l10n.t('Launch and debug a Flask web application'),
124124
};
125125
export const enterAppPathOrNamePath = {
126126
title: l10n.t('Debug Flask'),
127-
prompt: l10n.t('Debugpy: Flask'),
127+
prompt: l10n.t('Python Debugger: Flask'),
128128
invalid: l10n.t('Enter a valid name'),
129129
};
130130
}
131131
export namespace pyramid {
132132
export const snippet = {
133-
name: l10n.t('Debugpy: Pyramid Application'),
133+
name: l10n.t('Python Debugger: Pyramid Application'),
134134
};
135135
export const selectConfiguration = {
136136
label: l10n.t('Pyramid'),

src/extension/debugger/adapter/outdatedDebuggerPrompt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class OutdatedDebuggerPrompt implements DebugAdapterTracker {
3030
if (eventMessage.event === 'output') {
3131
const outputMessage = eventMessage as DebugProtocol.OutputEvent;
3232
if (outputMessage.body.category === 'telemetry') {
33-
// debugpy sends telemetry as both ptvsd and debugpy. This was done to help with
33+
// Python Debugger sends telemetry as both ptvsd and debugpy. This was done to help with
3434
// transition from ptvsd to debugpy while analyzing usage telemetry.
3535
if (
3636
outputMessage.body.output === 'ptvsd' &&

src/extension/debugger/adapter/remoteLaunchers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import '../../common/promiseUtils';
88
import { EXTENSION_ROOT_DIR } from '../../common/constants';
99
import { fileToCommandArgumentForPythonExt } from '../../common/stringUtils';
1010

11-
const pathToPythonLibDir = path.join(EXTENSION_ROOT_DIR, 'pythonFiles', 'lib', 'python');
11+
const pathToPythonLibDir = path.join(EXTENSION_ROOT_DIR, 'bundled', 'libs');
1212
const pathToDebugger = path.join(pathToPythonLibDir, 'debugpy');
1313

1414
type RemoteDebugOptions = {

src/extension/debugger/configuration/dynamicdebugConfigurationService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class DynamicPythonDebugConfigurationService implements IDynamicDebugConf
2323
const providers = [];
2424

2525
providers.push({
26-
name: 'Debugpy: Python File',
26+
name: 'Python Debugger: Python File',
2727
type: DebuggerTypeName,
2828
request: 'launch',
2929
program: '${file}',
@@ -33,7 +33,7 @@ export class DynamicPythonDebugConfigurationService implements IDynamicDebugConf
3333
const djangoManagePath = await DynamicPythonDebugConfigurationService.getDjangoPath(folder);
3434
if (djangoManagePath) {
3535
providers.push({
36-
name: 'Debugpy: Django',
36+
name: 'Python Debugger: Django',
3737
type: DebuggerTypeName,
3838
request: 'launch',
3939
program: `${workspaceFolderToken}${path.sep}${djangoManagePath}`,
@@ -46,7 +46,7 @@ export class DynamicPythonDebugConfigurationService implements IDynamicDebugConf
4646
const flaskPath = await DynamicPythonDebugConfigurationService.getFlaskPath(folder);
4747
if (flaskPath) {
4848
providers.push({
49-
name: 'Debugpy: Flask',
49+
name: 'Python Debugger: Flask',
5050
type: DebuggerTypeName,
5151
request: 'launch',
5252
module: 'flask',
@@ -64,7 +64,7 @@ export class DynamicPythonDebugConfigurationService implements IDynamicDebugConf
6464
if (fastApiPath) {
6565
fastApiPath = replaceAll(path.relative(folder.uri.fsPath, fastApiPath), path.sep, '.').replace('.py', '');
6666
providers.push({
67-
name: 'Debugpy: FastAPI',
67+
name: 'Python Debugger: FastAPI',
6868
type: DebuggerTypeName,
6969
request: 'launch',
7070
module: 'uvicorn',

src/extension/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import { EventName } from './telemetry/constants';
2020
// your extension is activated the very first time the command is executed
2121
export async function activate(context: IExtensionContext): Promise<void> {
2222
// Setup logging
23-
const outputChannel = createOutputChannel('Debugpy');
23+
const outputChannel = createOutputChannel('Python Debugger');
2424
context.subscriptions.push(outputChannel, registerLogger(outputChannel));
2525
context.subscriptions.push(registerCommand(Commands.ViewOutput, () => outputChannel.show()));
2626

27-
traceLog(`Name: Debugpy`);
27+
traceLog(`Name: Python Debugger`);
2828
traceLog(`Module: debugpy`);
2929

3030
try {

src/extension/telemetry/constants.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,5 @@ export enum EventName {
1717
DEBUGGER_ATTACH_TO_LOCAL_PROCESS = 'DEBUGGER.ATTACH_TO_LOCAL_PROCESS',
1818
DEBUGGER_CONFIGURATION_PROMPTS = 'DEBUGGER.CONFIGURATION.PROMPTS',
1919
DEBUGGER_CONFIGURATION_PROMPTS_IN_LAUNCH_JSON = 'DEBUGGER.CONFIGURATION.PROMPTS.IN.LAUNCH.JSON',
20-
DIAGNOSTICS_MESSAGE = 'DIAGNOSTICS.MESSAGE',
21-
DIAGNOSTICS_ACTION = 'DIAGNOSTICS.ACTION',
2220
ENVFILE_VARIABLE_SUBSTITUTION = 'ENVFILE_VARIABLE_SUBSTITUTION',
2321
}

src/extension/telemetry/index.ts

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -384,21 +384,6 @@ export interface IEventNamePropertyMapping {
384384
*/
385385
console?: ConsoleType;
386386
};
387-
// /**
388-
// * Telemetry event sent when we are checking if we can handle the diagnostic code
389-
// */
390-
// /* __GDPR__
391-
// "diagnostics.message" : {
392-
// "code" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "karthiknadig" }
393-
// }
394-
// */
395-
// [EventName.DIAGNOSTICS_MESSAGE]: {
396-
// /**
397-
// * Code of diagnostics message detected and displayed.
398-
// * @type {string}
399-
// */
400-
// code: DiagnosticCodes;
401-
// };
402387
/**
403388
* Telemetry captured when user code starts running after loading the debugger.
404389
*/
@@ -655,39 +640,6 @@ export interface IEventNamePropertyMapping {
655640
"debugger.configuration.prompts.in.launch.json" : { "owner": "paulacamargo25" }
656641
*/
657642
[EventName.DEBUGGER_CONFIGURATION_PROMPTS_IN_LAUNCH_JSON]: never | undefined;
658-
/**
659-
* Telemetry event sent with details of actions when invoking a diagnostic command
660-
*/
661-
/* __GDPR__
662-
"diagnostics.action" : {
663-
"commandname" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "karthiknadig" },
664-
"ignorecode" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "karthiknadig" },
665-
"url" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "karthiknadig" },
666-
"action" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "karthiknadig" }
667-
}
668-
*/
669-
[EventName.DIAGNOSTICS_ACTION]: {
670-
/**
671-
* Diagnostics command executed.
672-
* @type {string}
673-
*/
674-
commandName?: string;
675-
/**
676-
* Diagnostisc code ignored (message will not be seen again).
677-
* @type {string}
678-
*/
679-
ignoreCode?: string;
680-
/**
681-
* Url of web page launched in browser.
682-
* @type {string}
683-
*/
684-
url?: string;
685-
/**
686-
* Custom actions performed.
687-
* @type {'switchToCommandPrompt'}
688-
*/
689-
action?: 'switchToCommandPrompt';
690-
};
691643
/**
692644
* Telemetry event sent when substituting Environment variables to calculate value of variables
693645
*/

src/test/common.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,5 @@ function getPythonPath(): string {
9494
}
9595

9696
export interface IExtensionTestApi extends IExtensionApi {}
97+
98+
export const debuggerTypeName = 'debugpy';

src/test/unittest/adapter/remoteLaunchers.unit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ suite('External debugpy Debugger Launcher', () => {
5252
});
5353

5454
suite('Path To Debugger Package', () => {
55-
const pathToPythonLibDir = path.join(EXTENSION_ROOT_DIR, 'pythonFiles', 'lib', 'python');
55+
const pathToPythonLibDir = path.join(EXTENSION_ROOT_DIR, 'bundled', 'libs');
5656
test('Path to debugpy debugger package', () => {
5757
const actual = launchers.getDebugpyPackagePath();
5858
const expected = path.join(pathToPythonLibDir, 'debugpy');

src/test/unittest/configuration/providers/fileLaunchWithArgs.unit.test renamed to src/test/unittest/configuration/providers/fileLaunchWithArgs.unit.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ suite('Debugging - Configuration Provider File with Arguments', () => {
1717
const folder = { uri: Uri.parse(path.join('one', 'two')), name: '1', index: 0 };
1818
const state = { config: {}, folder };
1919

20-
await buildFileWithArgsLaunchDebugConfiguration(undefined as unknown as MultiStepInput<DebugConfigurationState>, state);
20+
await buildFileWithArgsLaunchDebugConfiguration(
21+
undefined as unknown as MultiStepInput<DebugConfigurationState>,
22+
state,
23+
);
2124

2225
const config = {
2326
name: DebugConfigStrings.fileWithArgs.snippet.name,

src/test/unittest/configuration/resolvers/attach.unit.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { AttachRequestArguments, DebugOptions } from '../../../../extension/type
2121
import { AttachConfigurationResolver } from '../../../../extension/debugger/configuration/resolvers/attach';
2222
import * as vscodeapi from '../../../../extension/common/vscodeapi';
2323
import * as platform from '../../../../extension/common/platform';
24+
import { debuggerTypeName } from '../../../common';
2425

2526
getInfoPerOS().forEach(([osName, osType, path]) => {
2627
if (osType === platform.OSType.Unknown) {
@@ -97,7 +98,7 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
9798

9899
const attach: Partial<AttachRequestArguments> = {
99100
name: 'Python attach',
100-
type: 'debugpy',
101+
type: debuggerTypeName,
101102
request: 'attach',
102103
};
103104

0 commit comments

Comments
 (0)