When I build a binary in a subdirectory, build error links are not valid/clickable #3068
-
Hello, I have the following launch config: {
"version": "0.2.0",
"configurations": [
{
"name": "Service",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "cmd/controller",
"cwd": "${workspaceFolder}"
}
]
} Now, when I launch it Delve changes directory into cmd/controller and builds
When I click on I must be missing something, what is the correct launch configuration for this single Go application setup which is I believe pretty common use case. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Have the same issue, unable to find solution for this. As
As far as I can tell, resulting binary is executed from |
Beta Was this translation helpful? Give feedback.
-
The
This is a separate issue. Is it fair to say your actual issue is, "When I build a binary in a subdirectory, build error links are not valid/clickable"? If so, then that is potentially a bug that should be fixed and IMO changing the working directory that delve uses for invoking |
Beta Was this translation helpful? Give feedback.
The
go build
invocation is controlled by delve, not vscode-go. If delve supports a flag or other configuration option to change this behavior, please open a vscode-go feature request to add support for that (if we don't already support it). If delve does not have any such option, then this is a delve issue/request, not a vscode-go one.This is a separate issue. Is it fair to say your actual issue is, "When I build a binary in a subdirectory, build error links are not valid/clickable"? If so, then that is potentially a bug that should …