How can I add other extension icons to the Activity Bar?
I want to add new custom icon, next to the source control and debug icons.
I read this page but did not understand.
I went to path C:\Users\Moh\AppData\Local\Programs\Microsoft VS Code\resources\app and added this configs to package.json:

// etc...
"author": {
  "name": "Microsoft Corporation"
},
"license": "MIT",
"main": "./out/main",

//***************//
// I added following lines:
"contributes": {
  "views": {
    "code-runner": [
      {
        "id": "codeRunner",
        "name": "Code Runner"
      }
    ]
  }
},

// etc...

But nothing changed.
Is my chosen path correct?
Is the written configuration correct?


This code is added to the package.json of your extension that you are building. If you do not know what that means, read the docs on making your first extension.

From the docs, it works:

"contributes": {

    "viewsContainers": {

      "activitybar": [

        {
          "id": "package-explorer",        (use this id for the view name below)
          "title": "Package Explorer",
          "icon": "$(heart)"               (using built-in icons, it is this easy)
        }
      ]
    },

    "views": {

      "package-explorer": [                (id from above)

        {
          "id": "package-dependencies",    (viewlets within "PAckage Explorer")
          "name": "Dependencies",
          "type": "tree"
        },
        {
          "id": "package-outline",
          "name": "Outline"
        }
      ]
    }

The Activity Bar is one kind of ViewContainer. When you click on the heart icon it opens one view into the Side Bar which has two "viewlets": Dependencies and Outline.

The built-in icons are discussed here: https://code.visualstudio.com/api/references/icons-in-labels but you can use your own as detailed here: https://code.visualstudio.com/api/references/contribution-points#Icon-specifications

WHen you debug your extension you will see the ViewContainer and View contributions in the new vscode window opened to run your extension.

Contributing a ViewCOntainer with Views