feat(testing): Unify VSCode debug config #4117
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For a long time, we've had the following TODO in our VSCode
launch.json
(debug config) file:which was there because we had an ever-expanding number of nearly identical configurations, one per package. Each time we wanted to debug the tests in a new package, we had to copy and paste and make a new PR to get it on
master
. It was inefficient and frankly kind of a pain.When the need for yet another package's tests to be debugged came up, rather than continue the madness, I finally answered that TODO. This PR does a few things to make that happen:
inputs
section to the debug configuration, to allow more than the standard values in the config to be dynamic. - Include a command for reading the one part of the config that has been different per config entry - the package name - off of the open test file.launch.json
.CONTRIBUTING.md
explaining how to use the debugger.There's also a small amount of cleanup done to both the newly-unified config entry and the one other remaining one (which runs nextjs integration tests).