microsoft / microsoft/vscode-cpptools

doesn't work under custom devcontainer

Open
#13,637 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted Language Service
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Environment
  • OS and Version: docker
    Linux ice-home 6.14.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr 6 15:05:05 UTC 2025 x86_64
    x86_64 x86_64 GNU/Linux
    under root

  • VS Code Version:
    -Version: 1.100.2
    Commit: 848b80aeb52026648a8ff9f7c45a9b0a80641e2e
    Date: 2025-05-14T21:47:40.416Z
    Electron: 34.5.1
    ElectronBuildId: 11369351
    Chromium: 132.0.6834.210
    Node.js: 20.19.0
    V8: 13.2.152.41-electron.0
    OS: Linux x64 6.14.0-15-generic

  • C/C++ Extension Version: 1.26.1

  • If using SSH remote, specify OS of remote machine:
    rooted container

Bug Summary and Steps to Reproduce

Image

Bug Summary:

Steps to reproduce:

  1. prepare own cotainer. Run it as root
  2. install extension under devcontainer
  3. try use (say, goto definition of function)

Expected behavior:
works

Configuration and Logs
2025-05-25 08:17:40.416 [info] Extension host with pid 852 started
2025-05-25 08:17:40.418 [info] Lock '/root/.vscode-server/data/User/workspaceStorage/8030c29de55fbb539249111912790f17/vscode.lock': Lock acquired.
2025-05-25 08:17:40.535 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2025-05-25 08:17:40.536 [info] ExtensionService#_doActivateExtension KylinIdeTeam.cppdebug, startup: false, activationEvent: 'onLanguage:c'
2025-05-25 08:17:40.536 [info] ExtensionService#_doActivateExtension ms-vscode.cpptools, startup: false, activationEvent: 'onLanguage:c'
2025-05-25 08:17:40.769 [info] ExtensionService#_doActivateExtension vscode.configuration-editing, startup: false, activationEvent: 'onLanguage:jsonc'
2025-05-25 08:17:40.770 [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2025-05-25 08:17:40.770 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2025-05-25 08:17:40.944 [error] Activating extension ms-vscode.cpptools failed due to an error:
2025-05-25 08:17:40.944 [error] Error: command 'extension.pickNativeProcess' already exists
	at Wb.registerCommand (file:///vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/out/vs/workbench/api/node/extensionHostProcess.js:119:40218)
	at Object.registerCommand (file:///vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/out/vs/workbench/api/node/extensionHostProcess.js:170:30271)
	at Object.initialize (/root/.vscode-server/extensions/ms-vscode.cpptools-1.26.1-linux-x64/dist/src/main.js:12155:38)
	at activate (/root/.vscode-server/extensions/ms-vscode.cpptools-1.26.1-linux-x64/dist/src/main.js:116856:29)
	at ly.kb (file:///vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/out/vs/workbench/api/node/extensionHostProcess.js:123:15268)
	at ly.jb (file:///vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/out/vs/workbench/api/node/extensionHostProcess.js:123:14975)
	at file:///vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/out/vs/workbench/api/node/extensionHostProcess.js:123:13133
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Nb.n (file:///vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/out/vs/workbench/api/node/extensionHostProcess.js:119:13382)
	at async Nb.m (file:///vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/out/vs/workbench/api/node/extensionHostProcess.js:119:13345)
	at async Nb.l (file:///vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/out/vs/workbench/api/node/extensionHostProcess.js:119:12801)
2025-05-25 08:17:40.944 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2025-05-25 08:17:40.974 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2025-05-25 08:17:40.974 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2025-05-25 08:17:41.377 [info] Eager extensions activated
2025-05-25 08:17:41.377 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2025-05-25 08:17:41.377 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2025-05-25 08:17:41.612 [warning] [Decorations] CAPPING events from decorations provider vscode.git 4682
2025-05-25 08:17:42.224 [warning] [Decorations] CAPPING events from decorations provider vscode.git 4682
2025-05-25 08:32:50.016 [warning] [Decorations] CAPPING events from decorations provider vscode.git 4683
2025-05-25 08:32:55.114 [warning] [Decorations] CAPPING events from decorations provider vscode.git 4683

====
no option to select 'cpptools' logs
Other Extensions

doesn't matter. could disable all of them

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce in a root-run custom devcontainer with VS Code 1.100.2 and C/C++ Extension 1.26.1, then inspect extension activation around dist/src/main.js and the failed extension.pickNativeProcess registration shown in the log. Done means the extension activates in that environment and goto definition works without the duplicate-command error; no repository test is named in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.