VsCode Extension 扩展开发,基本是以Command命令为核心的。开发一个命令是三个地方:
1、js代码:
// Display a message box to the user
vscode.window.showInformationMessage('Hello Vs Code Extension!');
});
context.subscriptions.push(disposable);
2、定义命令package.json
"contributes": {
"commands": [
{
"command": "extension.helloWorld",
"title": "Hello World"
}
]
},
3、还是packag.json
"activationEvents": [
"onCommand:extension.helloWorld"
]
这里特别要注意,在命令uri前面加个onCommand:
width="800" height="600" src="//player.bilibili.com/player.html?aid=49731529&page=1" scrolling="no" border="0" allowfullscreen="true">