Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix forcing test godebug on GoDebug without params #521

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

gcollura
Copy link
Contributor

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 that GoDebug with no params, would always be on a Test* function, which was then causing the elif cfg_exist to never reach: https://github.com/gcollura/go.nvim/blob/18f782221a6a72840e9dcf4f5b13cbd5f2967c1d/lua/go/dap.lua?plain=1#L557

This 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.

Copy link
Owner

@ray-x ray-x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ray-x ray-x merged commit 4dedae4 into ray-x:master Nov 11, 2024
0 of 3 checks passed
@gcollura gcollura deleted the fix-godebug-selection branch November 12, 2024 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants