bug: debugger does not start #140
Replies: 7 comments 10 replies
-
Please provide a minimal reproducible Go test example. |
Beta Was this translation helpful? Give feedback.
-
Check out https://github.com/golang-jwt/jwt , run |
Beta Was this translation helpful? Give feedback.
-
I cloned down the repo, found a test at random and tried to both run it and then debug it. Works on my machine 😄 It feels like this could be a configuration issue on your end...? Since LazyVim is already using neotest-golang, I could quite easily try it out here too, and it works for me: |
Beta Was this translation helpful? Give feedback.
-
Were you able to run a test at all (not debug it)? Could it be that you haven't enabled debugging in your neotest-golang config with What happens if you run |
Beta Was this translation helpful? Give feedback.
-
I moved the thread here @asfaltboy as I suspect this to be a configuration issue. |
Beta Was this translation helpful? Give feedback.
-
Thanks Fredrik, you're right I thought the config is identical to neotest-go, but didnd't realise I need to pass With regards to I added it now to my config, and updated to latest release as of now. But sadly, the default package selection still fails for me in
|
Beta Was this translation helpful? Give feedback.
-
There may be more issues with directory/package lookup as well For instance, I have a large repo, where the tested directory resolves to "./..." which runs, but way way slower than it does from CLI or with neotest-go. I think the best performing selection for running a single test or a single file can be achieved by passing in the test file path or package directly, relative to the cwd, though it seems preventing it from using package internal names. So for instance in jwt it would fail with a
The next best thing would be local dir And failing that, it would be the package name of course. |
Beta Was this translation helpful? Give feedback.
-
Did you check docs and existing issues?
Neovim version (nvim -v)
0.10.0
Operating system/version
macOS 14.5
Describe the bug
neotest-golang runs a single test, but cannot start debugger for the same test.
Note: neotest-go starts the debugger (though it runs for all tests in the module 😢 ), but neotest-golang fails with an error:
Steps To Reproduce
Expected Behavior
Should run the debugger
Your Lua setup
Beta Was this translation helpful? Give feedback.
All reactions