Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS code extension "HelloWorld" sample in typescript is not working

I'm trying to create VS code extension and followed the steps provided in documentation here

I setup "helloworld" project in typescript but when i press "F5", nothing happening. I saw, typescript files complied to JS but project is not opening new instance of VS code and enable debug mode not enabled on "F5".

Any suggestions ?.

launch.json file

{
"version": "0.2.0",
"configurations": [
    {
        "name": "Extension",
        "type": "extensionHost",
        "request": "launch",
        "runtimeExecutable": "${execPath}",
        "args": [
            "--extensionDevelopmentPath=${workspaceFolder}"
        ],
        "outFiles": [
            "${workspaceFolder}/out/**/*.js"
        ],
        "preLaunchTask": "npm: watch"
    },
    {
        "name": "Extension Tests",
        "type": "extensionHost",
        "request": "launch",
        "runtimeExecutable": "${execPath}",
        "args": [
            "--extensionDevelopmentPath=${workspaceFolder}",
            "--extensionTestsPath=${workspaceFolder}/out/test"
        ],
        "outFiles": [
            "${workspaceFolder}/out/test/**/*.js"
        ],
        "preLaunchTask": "npm: watch"
    },

]

}

Steps i followed is same as mentioned in VS code doc

  1. npm install -g yo generator-code
  2. yo code
  3. Launch VS Code,
  4. choose File > Open Folder and pick the folder that you generated.
  5. Press F5 or click on the Debug icon and click Start.

    For me step #5 is not working and not doing anything

like image 372
user1760384 Avatar asked Apr 12 '26 21:04

user1760384


1 Answers

I have the same issue in my VSCode version 1.72

and in package.json it was the latest at generation time (1.74)

check the VSCode version in package.json

"engines": {
   "vscode": "^1.52.0"
  },

use your version or less than your version

EX:- my VSCode version is 1.72 and added 1.52

like image 191
bhavesh Avatar answered Apr 15 '26 13:04

bhavesh