terraform/docs/debugging-configs/vscode/launch-from-vscode-debugger/launch.json
Sarah French 6784407b65
Add .vscode/ to .gitignore, add launch configuration samples elsewhere in repo, update debugging docs (#36527)
* Remove .vscode/ from version control

* Add section about debugging automated tests

* Update existing debugging advice to reference  example file, deduplicate text about automated tests

* Add details about launching TF ni debug mode from within VS Code

* Respond to review feedback, other small edits like full-stops
2025-02-19 10:04:33 +00:00

27 lines
No EOL
1.1 KiB
JSON

{
"version": "0.2.0",
"configurations": [
{
// Runs Terraform using the Terraform configuration specified via the chdir argument
"name": "Run Terraform in debug mode",
"request": "launch",
"type": "go",
"args": [
"-chdir=<absolute path to a Terraform configuration>",
// Change this array to perform different terraform commands with different arguments.
"plan",
"-var='name=value'"
],
// "cwd": "<absolute path to a Terraform configuration>", // An alternative to using the -chdir global flag above.
// Environment variables can be set from a file or as key-value pairs in the configuration.
// "env": {
// "MY_ENV": "my-value",
// },
// "envFile": "./vscode/private.env",
"mode": "debug",
"program": "${workspaceFolder}",
"console": "integratedTerminal", // allows responding to y/n in terminal, e.g. in apply command.
"showLog": false // dlv's logs
}
]
}