You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support overriding the location of the .dart_code folder with an environment variable #5536
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).
@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?).
@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.
Activity
DanTup commentedon Jun 5, 2025
@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 theDART_CODE_CONFIGURATION_PATHenvironment 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?).
keertip commentedon Jun 5, 2025
Thanks Danny. Will try it out and confirm.
DanTup commentedon Jun 5, 2025
@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.
keertip commentedon Jun 5, 2025
Yes, this would work for me.
Add the ability to override the ".dart_code" folder with a relative o…
DanTup commentedon Jun 30, 2025
@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.
keertip commentedon Jun 30, 2025
Thanks for the update!