Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"debugpy.command.clearCacheAndReload.title": "Clear Cache and Reload Window",
"debugpy.command.clearCacheAndReload.title": "Python Debugger: Reload and Repair",
"debugpy.command.debugInTerminal.title": "Python Debugger: Debug Python File",
"debugpy.command.debugUsingLaunchConfig.title": "Python Debugger: Debug using launch.json",
"debugpy.command.reportIssue.title": "Report Issue...",
Expand Down
19 changes: 16 additions & 3 deletions src/extension/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { registerLogger, traceError } from './common/log/logging';
import { sendTelemetryEvent } from './telemetry';
import { EventName } from './telemetry/constants';
import { IExtensionApi } from './apiTypes';
import { commands } from 'vscode';
import { commands, window } from 'vscode';
import { getDebugpyPackagePath } from './debugger/adapter/remoteLaunchers';

export async function activate(context: IExtensionContext): Promise<IExtensionApi | undefined> {
Expand All @@ -27,7 +27,20 @@ export async function activate(context: IExtensionContext): Promise<IExtensionAp
sendTelemetryEvent(EventName.DEBUG_SUCCESS_ACTIVATION);
return api;
} catch (ex) {
traceError('sendDebugpySuccessActivationTelemetry() failed.', ex);
throw ex; // re-raise
traceError('Python Debugger activation failed.', ex);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this is necessary. Is this something you're hitting and where the clear storage command is fixing the issue?

window
.showErrorMessage(
'Python Debugger failed to activate. Reload and repair the extension to recover.',
'Reload and Repair',
)
.then((selection) => {
if (selection === 'Reload and Repair') {
commands.executeCommand(Commands.ClearStorage).then(
undefined,
() => commands.executeCommand('workbench.action.reloadWindow'),
);
}
});
return undefined;
}
}