Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
muuvmuuv opened this issue Jun 19, 2021 · 2 comments
Closed
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues wont-fix

Comments

@muuvmuuv
Copy link
Contributor

muuvmuuv commented Jun 19, 2021

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"
      ]
    }
  ]
}
@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues bug Issue identified by VS Code Team member as probable bug labels Jun 28, 2021
@weinand weinand added this to the August 2021 milestone Jul 27, 2021
@weinand
Copy link
Contributor

weinand commented Aug 10, 2021

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

@weinand weinand added wont-fix and removed bug Issue identified by VS Code Team member as probable bug labels Aug 30, 2022
@weinand weinand removed this from the September 2022 milestone Aug 30, 2022
@weinand
Copy link
Contributor

weinand commented Aug 30, 2022

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"

@weinand weinand closed this as completed Aug 30, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues wont-fix
Projects
None yet
Development

No branches or pull requests

3 participants