-
Notifications
You must be signed in to change notification settings - Fork 769
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
Golang debug test at cursor via hotkey ctrl-k ctrl-c not working #3678
Comments
I see the same symptoms, and I'll try to answer the same questions. I am on Windows, using v1.97.2 of vscode, with v0.44.0 of vscode-go (just go to the extensions tab and hover on the "Go" extension to find this). All of the keyboard shortcuts for debugging tests appear to get that error dialog, including some not in the context menu. My context menu has some of these functions, not all of them, but some of them are slightly duplicated: For instance, "Debug Test and Cursor" is in the menu twice, one with a key binding next to it and the other not. If I select the one without the key binding, it works fine. If I select the one with the key binding, it gets that error dialog. My test file only has two tests in it, although one of them is a table-based test. I see the same behavior with both tests. The only reference setting beginning with "go" is: As I only just discovered the existence of these features, I never saw it working before, so the previous version of vscode-go is sort of irrelevant. |
I'm facing this same error. I'm using Ubuntu 22.04.5 LTS and vscode version: 1.97.2; x64; e54c774e0add60467559eb0d1e229c6452cf8447. |
|
This issue can be resolved either by:
Fixing the old test explorer could be done one of two ways:
If someone wants to take a stab at it, here's the relevant code: vscode-go/extension/src/goTest/run.ts Lines 139 to 155 in e10c953
|
okay so the simple workaround for now is to bind ctrl-; ctrl-c to the "Go: debug test at cursor" option? Seems to solve the problem. |
Correct, that is the simplest workaround |
thanks for confirming, works fine, I just didn't notice those options were there. |
Type: Bug
In go I have a test file with lots of tests, usually I hit ctrl-k ctrl-c to debug the test at the cursor location.
Used to work great, I upgraded vscode recently and now it says
The Go test explorer does not support debugging multiple tests
If I run it from the right-click menu it works most of the time, sometimes not, and if I click the "debug test" at the top of the function it works all the time, but the hotkey always fails.
Hotkey as you might guess is most useful.
Extension version: 0.44.0
VS Code version: Code 1.97.0 (33fc5a94a3f99ebe7087e8fe79fbe1d37a251016, 2025-02-04T22:41:26.688Z)
OS version: Linux x64 6.8.0-52-generic
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: