我在此页之后输入了我的第一个vscode扩展。
以下是我的步骤:
下面是生成的package.json:
{
"name": "helloworld",
"displayName": "helloworld",
"description": "description helloworld",
"version": "0.0.1",
"engines": {
"vscode": "^1.72.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:helloworld.helloWorld"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "helloworld.helloWorld",
"title": "Hello World"
}
]
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/glob": "^8.0.0",
"@types/mocha": "^10.0.0",
"@types/node": "16.x",
"@types/vscode": "^1.72.0",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"@vscode/test-electron": "^2.1.5",
"eslint": "^8.24.0",
"glob": "^8.0.3",
"mocha": "^10.0.0",
"typescript": "^4.8.4"
}
}当我按下H5进行调试时,这里没有匹配的命令:

我被困在这里一段时间了,我的命令在哪里??
发布于 2022-12-02 09:24:27
我刚才也遇到过这种情况。确保engines.vscode中的package.json与正在运行的vscode版本相匹配:
"engines": {
"vscode": "^1.73.0"
},我想生成器将使用最新版本,但您可能还没有升级。对我来说就是这样。
https://stackoverflow.com/questions/74149764
复制相似问题