javascript – Extension Not Loading in Visual Studio Code – No Debug Messages Displayed
I’m developing an extension for Visual Studio Code, and I’m encountering an issue where the extension doesn’t seem to load, and I’m not seeing any debug messages I’ve added. Here are the details of my problem:
package.json:
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "name.function",
"title": "Function Name"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "FunctionName",
"title": "Function Name",
"icon": "media/icon/icon.svg"
}
]
},
"views": {
"FunctionName": [
{
"type": "webview",
"id": "name.function",
"name": "Function Name"
}
]
}
},
The Problem:
I’ve added the following line to extension.ts to check if the extension is loading:
console.log('Debug1A');
vscode.window.showInformationMessage('Debug1B');
Despite this, I’m not seeing any messages in the output or UI. I’ve checked the following:
- launch.json Configuration: The configuration seems correct, and I’m running the extension in a debug session.
- Compiled Files: The extension.js file exists in the ./out directory, and the TypeScript files compile without errors.
I removed the ActivationEvents because in the terminal it told me they would be generated automatically
"activationEvents": [
"onCommand:name.function",
"onView:name.function"
],
Any help or suggestions would be greatly appreciated!
Read more here: Source link
