You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
exportfunctionactivate(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 activatedconsole.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.jsonconstdisposables: 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 uservscode.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.
The text was updated successfully, but these errors were encountered:
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:
The command isn't actually running twice, but the listener for
onDidExecuteCommand
does get called twice.The text was updated successfully, but these errors were encountered: