Document azure-dev.commands.getDotEnvFilePath for use in VS Code configurations#5218
Document azure-dev.commands.getDotEnvFilePath for use in VS Code configurations#5218Copilot wants to merge 4 commits into
Conversation
Co-authored-by: spboyer <7681382+spboyer@users.noreply.github.com>
Co-authored-by: spboyer <7681382+spboyer@users.noreply.github.com>
|
@brandom-msft can you review? |
Guessing you meant @bwateratmsft? |
bwateratmsft
left a comment
There was a problem hiding this comment.
@spboyer I wonder if this wouldn't be better fulfilled with a page on https://code.visualstudio.com/docs/?
| /** | ||
| * Get the path to the .env file for an Azure developer environment. | ||
| * | ||
| * This can be used in launch.json to provide environment variables to VS Code tasks: | ||
| * ```json | ||
| * { | ||
| * "configurations": [ | ||
| * { | ||
| * "envFile": "${input:azdDotenv}" | ||
| * } | ||
| * ], | ||
| * "inputs": [ | ||
| * { | ||
| * "id": "azdDotenv", | ||
| * "type": "command", | ||
| * "command": "azure-dev.commands.getDotEnvFilePath" | ||
| * } | ||
| * ] | ||
| * } | ||
| * ``` | ||
| * | ||
| * @param context - The VS Code extension action context | ||
| * @param args - Optional array containing [environmentName, workingDir] | ||
| * - environmentName: Name of the environment to use (uses default if not provided) | ||
| * - workingDir: Working directory to find environments (uses first workspace folder if not provided) | ||
| * @returns Path to the .env file for the specified environment | ||
| */ |
There was a problem hiding this comment.
There's nothing particularly mistaken here, but I am not sure it's even helpful to add this JSDoc. The function cannot be called directly, rather you need to use one of the utils wrappers like callWithTelemetryAndErrorHandling, or in this particular case, registerCommand's wrapping.
@spboyer I'll leave it up to you.
| For more information about Azure Developer CLI and this VS Code extension, please [see the documentation](https://aka.ms/azure-dev/vscode). | ||
|
|
||
| ## Extension Documentation | ||
| - [Available Commands](docs/commands.md) - Documentation for commands provided by this extension, including utility commands for use in VS Code configurations. |
There was a problem hiding this comment.
I do not know if a relative link to another doc will work on the marketplace page or in VSCode itself--it needs to be tested.
There was a problem hiding this comment.
The relative link format has been kept as-is in commit 6d20ad5. If there are issues with this format in the marketplace or VS Code itself, we can address it in a follow-up PR after testing.
Co-authored-by: bwateratmsft <36966225+bwateratmsft@users.noreply.github.com>
|
@kristenwomack how do you want to handle this documentation? |
|
Hi @@copilot. Thank you for your interest in helping to improve the Azure Developer CLI experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
|
Hi @@copilot. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing "/reopen" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the "no-recent-activity" label; otherwise, this is likely to be closed again with the next cleanup pass. |
This PR adds documentation for the
azure-dev.commands.getDotEnvFilePathcommand, which can be used in VS Code configurations to access environment variables from Azure Developer CLI environments.Changes:
/ext/vscode/docs/commands.mdgetDotEnvFilePathcommand with usage instructions and examplesgetDotEnvFilePathfunction for better code-level documentationExample usage in launch.json:
{ "configurations": [ { // Your debug configuration "envFile": "${input:azdDotenv}" } ], "inputs": [ { "id": "azdDotenv", "type": "command", "command": "azure-dev.commands.getDotEnvFilePath" } ] }This allows VS Code to use environment variables from an Azure Developer environment's
.envfile when running or debugging applications, which was previously undocumented but useful functionality.Fixes #5135.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.