-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Can't connect VSCode to dlv server properly #3720
Comments
What's the output of |
Is it not printing anything else? Can you add |
Warning accept-multi: ignored |
here's the output with
|
@aarzilli Wanna mention that if I remove --continue from the command & run the command and then connect vscode client then debugger will work properly however I don't prefer setup without --continue |
but this doesn't have the crash |
Those are all of the logs that had been displayed in my terminal 🤔 |
@aarzilli One of the things I have noticed is that debugger was not working with the following setup where I have 3 breakpoints set in vscode 2 of them are enabled (the real logic I am testing) and 1 is disabled(old logic that I was testing before) |
Without a way to reproduce this or logs of the problem happening this isn't actionable. |
I hear you; Is there another way to show the issue in my logs or any workaround for that given that --log-output=gdbwire didn't show anything useful |
I'm rereading this and I think I don't even understand what problem is being described here. You launch Which it does, yes? At this point you do not expect any breakpoints to have effect, yes? Then you connect to it with vscode in Are the breakpoints showing up as verified in vscode? |
correct
no
correct, however breakpoints take effect if I either enabled the 1st breakpoint in VSCode as shown in 2nd screenshot or totally clear the 1st breakpoint from VSCode |
Ok, pass |
nothing but this single log when I connect to delve server
|
@hyangah is vscode-go really still using the json-rpc connection in attach/remote mode? |
Until that moment, based on my observations, connecting to the Delve server through the VSCode client will not work properly if I disable breakpoints (that were previously enabled) in VSCode before connecting the client. However, if I enable all breakpoints set in VSCode or remove any disabled breakpoints, then connecting to the Delve server will work properly. Not sure if that's helpful or not or even if that makes sense |
@aarzilli Unfortunately yes. We noticed many users depend on the automated path mapping that's implemented only in the legacy debug adapter, so we are currently looking into implementing in in the delve. We hoped @taman9333 is your launch.json correct? According to https://github.com/golang/vscode-go/wiki/debugging-legacy#remote-debugging, Try |
@hyangah Yep I am using delve for local debugging and I am using
and In my vscode I am attaching the debugger client to the delve server started by the above command |
In this case, have you tried to use the DAP mode instead? If you still want to stick with the legacy adapter, |
But I think DAP mode will not work smoothly with I will test --log-output=rpc and "showLog": true & check the output |
@taman9333 No, I don't think that's true. DAP mode works with the delve headless server started with |
@hyangah last year a few changes were made to substitute path application that should make it better for mapping windows-to-unix and vice versa. Is it still the case that substitute path is not enough? |
dlv version
)?1.22.1
go version
)?1.22.0
Mac OS 14.4.1 (23E224)
,amd64
Debugging using the following command inside .air.toml configuraiton
When I connect vscode debugger client I found the following error log
Execution should stop at breakpoints however program continue to execute & not respecting breakpoints
Here's the launch.json configuration
The text was updated successfully, but these errors were encountered: