fix forcing test godebug on GoDebug
without params
#521
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.
The only way to trigger the .vscode/launch.json dropdown list was to be on a
func main
function, which is unlikely when you're trying to debug from a large Go project. go.nvim was assuming thatGoDebug
with no params, would always be on aTest*
function, which was then causing theelif cfg_exist
to never reach: https://github.com/gcollura/go.nvim/blob/18f782221a6a72840e9dcf4f5b13cbd5f2967c1d/lua/go/dap.lua?plain=1#L557This PR checks a little more strictly that the user doesn't want to trigger a debug run on a "test", and it doesn't try to override the option passed by the user. For example it would set
optarg['t'] = true
even when another flag was passed.