-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugverifiedVerification succeededVerification succeeded
Milestone
Description
This is the only way I've been able to repro this issue. I started with the hello world extension sample and modified the the activate:
export function activate(context: vscode.ExtensionContext) {
// Use the console to output diagnostic information (console.log) and errors (console.error)
// This line of code will only be executed once when your extension is activated
console.log('Congratulations, your extension "helloworld-sample" is now active!');
// The command has been defined in the package.json file
// Now provide the implementation of the command with registerCommand
// The commandId parameter must match the command field in package.json
const disposables: vscode.Disposable[] = [];
disposables.push(vscode.commands.registerCommand('extension.helloWorld', () => {
// The code you place here will be executed every time your command is executed
// Display a message box to the user
vscode.window.showInformationMessage('Hello World!');
}));
disposables.push(vscode.commands.onDidExecuteCommand((e: vscode.CommandExecutionEvent) => {
console.log(e.command);
}));
context.subscriptions.push(...disposables);
}The command isn't actually running twice, but the listener for onDidExecuteCommand does get called twice.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugverifiedVerification succeededVerification succeeded