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
Using a VS Code starter extension created with yo code
// The module 'vscode' contains the VS Code extensibility API// Import the module and reference it with the alias vscode in your code belowimport{log}from'console';import*asvscodefrom'vscode';// This method is called when your extension is activated// Your extension is activated the very first time the command is executedexportfunctionactivate(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 "test-ext" is now active!');}// This method is called when yvscode.our extension is deactivatedexportfunctiondeactivate(){}
Enable paste with imports
paste the text vscode.window.createWebviewPanel() into the body of activate
π Actual behavior
You end up with invalid code:
// The module 'vscode' contains the VS Code extensibility API// Import the module and reference it with the alias vscode in your code belowimport{log}from'console';import*asvscodefrom'vscode';// This method is called when your extension is activated// Your extension is activated the very first time the command is executedexportfunctionactivate(context: vscode.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 "test-ext" is now active!');vscode.window.createWebviewPanel()}//vscode. This method is called when yvscode.our extension is deactivatedexportfunctiondeactivate(){}
Notice:
context: vscode.vscode.ExtensionContext
vscode. was randomly to the comment on deactivate
π Expected behavior
Should just paste the text as no new imports are needed
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered:
mjbvz
changed the title
Paste with imports corrupts existing imports
Paste with imports corrupts other parts of file
Aug 5, 2024
π Search Terms
π Version & Regression Information
5.6.0-dev.20240805
β― Playground Link
No response
π» Code
yo code
vscode.window.createWebviewPanel()
into the body ofactivate
π Actual behavior
You end up with invalid code:
Notice:
context: vscode.vscode.ExtensionContext
vscode.
was randomly to the comment ondeactivate
π Expected behavior
Should just paste the text as no new imports are needed
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: