Finding VSCode extension extension id

Viewed 319

I am currently writing a vscode extension where I require to bundle some files with the extension and on some command, I need to deploy those files at some destination directory (like building a scaffold). For this purpose, I was looking into using these two functions:

const extensionPath = vscode.extensions.getExtension('extension.id').extensionUri.path;
const destinationPath = vscode.workspace.workspaceFolders[0].uri.path;

However, I had trouble finding the extension.id. If I use vscode.extensions.all to enumerate all the extensions, I see undefined_publisher.<name>. I believe this is because I have not published my extension yet, but in that case I guess the undefined_publisher part might change.

Is there any way I can locate my extension without using the publisher name?

1 Answers
Related