Skip to content

Using --extensions-dir and --user-data-dir in a launch task does not work #126737

Closed

Description

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.57.1 507ce72 arm64
  • OS Version: macOS 11.4

Steps to Reproduce:

  1. clone https://github.com/muuvmuuv/vscode-sundial
  2. run launch task

Launching will use my main VS Code settings and extension, while I explicitly told through "args" not to do so. It does work tho via command line code --user-data-dir=tmp/data --extensions-dir=tmp/ext testProject. While that, I noticed that with preLaunchTask it will never open.

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Launch Extension",
      "type": "extensionHost",
      "request": "launch",
      "args": [
        "--extensionDevelopmentPath=${workspaceFolder}",
        "--extensions-dir=${workspaceFolder}/tmp/ext", // does not work
        "--user-data-dir=${workspaceFolder}/tmp/data", // does not work
        "--enable-proposed-api=muuvmuuv.vscode-sundial",
        "${workspaceFolder}/testProject"
      ],
      "outFiles": [
        "${workspaceFolder}/dist/**/*.js"
      ]
    }
  ]
}

Activity

  1. added
    debug
    bug
    on Jun 28, 2021
  2. weinand commented on Aug 10, 2021

    @weinand
    Contributor

    I've created #130504 for the --user-data-dir problem.

  3. added and removed
    bug
    on Aug 30, 2022
  4. weinand commented on Aug 30, 2022

    @weinand
    Contributor

    Fixing the problem that the command line options --extensions-dir and --user-data-dir don't work in debug configurations is difficult and would result in large and high-risk code changes.

    However, the reason for using the command line options in the first place, is the problem that extension debugging always uses the "main VS Code settings and extensions". So, it is not possible to debug an extension in a clean environment.

    But with the recent work on settings profiles, "debugging an extension in a clean environment" is now in reach.

    I will close this issue in favor of the new feature request #159572: "Support extension debugging in a clean environment"

  5. locked and limited conversation to collaborators on Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debugwont-fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions