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
When looking for these in VSCode settings, I found out about ${name} being supported inside the path as a macro for the debug session name.
However, I was also instructed to set these settings for each workspace so that different workspaces don't conflict with each other. Which is a little too verbose when having lots of projects that you'd like to log.
Describe the solution you'd like
I'd like for the extension to support ${folder} or ${workspace} or similar so that I can create a path like ~/dev/logs/${workspace}/${name}.
Describe alternatives you've considered
Manually creating an inner folder for each workspace and defining it to the workspace settings.
Additional context
I was also reminded that some workspaces in VSCode can be unnamed. So in this case I believe the files could be simply left under ~/dev/logs/${name} as for my example.
In the next version you can use ${workspaceName} and we'll insert the value from vscode.workspace.name (or if that's not set, "unnamed-workspace" - although I think that only happens if you have no folders open).
The values VS Code gives us are:
The name (without the extension) of the current .code-workspace file (if there is one)
The name of the folder that's open (if not a workspace)
"untitled workspace" when you have multiple folders open but not saved as a workspace file
Here's an example from my logs folder after opening a few projects (some of which are code-workspaces):
Hi! Not sure if I'm doing something wrong, but I tested with:
[...]\\logs\\${workspaceName}\\${name}\\file.txt
And got:
[...]\logs\entrega_sunsoft\${name}\file.txt
Like, it didn't replace ${name} with anything.
Separate
Also, here are all the files I'm setting:
Although some of the markdown hints you changed it so it would show that ${workspaceName} would work, only flutterTestLogFile does show that we can also use ${name}:
And the extensionLogFile shows neither.
I would be willing to fix these markdowns with a PR but again, I'm not sure I could fix the ${name} since I'm not even sure what it would show in my case. My guess is that this would show, but maybe I don't get it:
Activity
DanTup commentedon Jul 8, 2024
In the next version you can use
${workspaceName}and we'll insert the value fromvscode.workspace.name(or if that's not set,"unnamed-workspace"- although I think that only happens if you have no folders open).The values VS Code gives us are:
.code-workspacefile (if there is one)Here's an example from my logs folder after opening a few projects (some of which are code-workspaces):
Support ${workspaceName} in configuration values that are log file paths
FMorschel commentedon Jul 15, 2024
Hi! Not sure if I'm doing something wrong, but I tested with:
And got:
Like, it didn't replace
${name}with anything.Separate
Also, here are all the files I'm setting:
Although some of the markdown hints you changed it so it would show that
${workspaceName}would work, onlyflutterTestLogFiledoes show that we can also use${name}:And the
extensionLogFileshows neither.I would be willing to fix these markdowns with a PR but again, I'm not sure I could fix the
${name}since I'm not even sure what it would show in my case. My guess is that this would show, but maybe I don't get it:FMorschel commentedon Jul 16, 2024
I saw you created #5184 relating to the first part of my last comment here. I created #5185 to fix the descriptions I also mentioned above.