зеркало из https://github.com/microsoft/azure-cli.git
{Docs} Documentation update for debugging this repository using VS Code (#14559)
This commit is contained in:
Родитель
3c54715e05
Коммит
51e3db9e88
|
@ -5,7 +5,7 @@
|
|||
"name": "Azure CLI Debug (Integrated Console)",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"pythonPath": "${config:python.pythonPath}",
|
||||
"pythonPath": "${command:python.interpreterPath}",
|
||||
"program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"args": [
|
||||
|
@ -24,7 +24,7 @@
|
|||
"type": "python",
|
||||
"request": "launch",
|
||||
"stopOnEntry": true,
|
||||
"pythonPath": "${config:python.pythonPath}",
|
||||
"pythonPath": "${command:python.interpreterPath}",
|
||||
"program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"args": [
|
||||
|
@ -40,7 +40,7 @@
|
|||
"name": "Azdev Scripts",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"pythonPath": "${config:python.pythonPath}",
|
||||
"pythonPath": "${command:python.interpreterPath}",
|
||||
"program": "${workspaceRoot}/tools/automation/__main__.py",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"args": [
|
||||
|
|
|
@ -45,12 +45,19 @@ The Azure Python CLI projects sources are located on GitHub (https://github.com/
|
|||
4. Open the folder containing the clone of this repository in VS Code
|
||||
5. Set the [Python Interpreter](https://code.visualstudio.com/docs/python/environments#_select-and-activate-an-environment) to use as the python.exe located in your virtual environment
|
||||
- If your virtual environment's Python Interpreter is not shown, you may need to add the root folder it's located in to the extension's venv path. This will be under File -> Preferences -> Settings -> Python: Venv Path.
|
||||
- You can also create a settings.json file under the .vscode folder and specify the interpreter's path similar to the JSON below
|
||||
```
|
||||
{
|
||||
"python.pythonPath": "C:\\repo\\env\\Scripts\\python.exe"
|
||||
}
|
||||
```
|
||||
- You can also use your workspace or user `settings.json`, or `launch.json` file to specify the interpreter's path. Details can be found in the Environments section of the Python VS Code extension [documentation](https://code.visualstudio.com/docs/python/environments#_choose-a-debugging-environment). An example in `settings.json`:
|
||||
```
|
||||
{
|
||||
"python.pythonPath": "C:\\repo\\env\\Scripts\\python.exe"
|
||||
}
|
||||
```
|
||||
or in `launch.json`:
|
||||
```
|
||||
{
|
||||
"pythonPath": "C:\\repo\\env\\Scripts\\python.exe"
|
||||
}
|
||||
```
|
||||
|
||||
6. Activate your environment and execute the following commands
|
||||
1. pip install azdev
|
||||
2. azdev setup -c
|
||||
|
|
Загрузка…
Ссылка в новой задаче