Skip to content

Support overriding the location of the .dart_code folder with an environment variable #5536

Closed

Description

@DanTup

With #5516 we added a way to have debug sessions automatically launched at startup, or when a special file was created.

For some uses of this, it would be better to keep it out of the tree (for example in the case where an IDE like Firebase Studio wants to use it to auto-connect to an existing session without polluting the users workspace with the temporary file).

One way to achieve this is to support an environment variable to override the location of this folder. For example:

SET DART_CODE_CONFIGURATION_PATH=/tmp/xyz123/.dart_code

Then when we load, we'll use this environment variable in place of .dart_code/ when looking for (and setting up a watcher for) the auto-launch file.

If the variable is set and is a relative path, then we will look for it in all workspaces (as we do with .dart_code by default). This means if you wanted to just rename or relocate the folder inside the tree you could, but if it's an absolute path then we will look for one (not per-workspace folder).

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Jun 5, 2025
  2. DanTup commented on Jun 5, 2025

    @DanTup
    MemberAuthor

    @keertip can you confirm if this would work for you?

    You'd need to create a temp folder (and then put the file inside it called autolaunch.json), and then set the absolute path to that temp folder in the DART_CODE_CONFIGURATION_PATH environment variable.

    Note: The environment variable would need to be set in a way that is accessible to the extension host (so this might mean setting it prior to the extension host being started, since I don't think they are updated?).

  3. added this to the v3.114.0 milestone on Jun 5, 2025
  4. keertip commented on Jun 5, 2025

    @keertip
    Contributor

    Thanks Danny. Will try it out and confirm.

  5. DanTup commented on Jun 5, 2025

    @DanTup
    MemberAuthor

    @keertip to be clear, I haven't made this change yet - I wanted to check it sounds like it'll work for you before implementing.

  6. keertip commented on Jun 5, 2025

    @keertip
    Contributor

    Yes, this would work for me.

  7. DanTup commented on Jun 30, 2025

    @DanTup
    MemberAuthor

    @keertip I double-checked, and I had landed this but it wasn't in a stable release yet (it is in the pre-release, but those aren't published to open-vsx, so are less easy to get on Firebase Studio). It will be in tomorrow's stable release though, which will then show up for Firebase Studio.

  8. keertip commented on Jun 30, 2025

    @keertip
    Contributor

    Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions