terraform/docs/debugging-configs/vscode/debug-automated-tests/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,003 B
JSON

{
"version": "0.2.0",
"configurations": [
{
// Highlight a test's name with your cursor and run this debugger configuration
// from the debugger tools in the left-side Activity Bar.
// This will result in the equivalent of this command being run using the debugger:
// `go test -v -run ^<selected text>$ <the current opened file's folder path>`
"name": "Run selected test",
"request": "launch",
"type": "go",
"args": [
"-test.v",
"-test.run",
"^${selectedText}$"
],
// 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": "auto",
"program": "${fileDirname}",
"showLog": true // dlv's logs
}
]
}