Open JensAc opened 2 years ago
If I run this in a shell, I get the same error:
$ dlv debug -mod=vendor
Error: unknown shorthand flag: 'm' in -mod=vendor
So it seems this flag is not supported by dlv
in general.
Indeed, you need to run it as part of the --build-flags
arguments of dlv
. Then, dlv
should start as usual.
I think there is something going wrong how the actual debugger command line is constructed in gud
.
I'm afraid you'll need to file this bug report at Emacs. in gud-common-init
, split-string-and-unquote
is used on the command:
(split-string-and-unquote "dlv debug --build-flags=\"-mod=vendor\"")
e.g. yields ("dlv" "debug" "--build-flags=" "-mod=vendor")
. I am not sure what the rest of gud-common-init
is doing to these words, but the result seems wrong.
Alright, that was also the point where I stopped investigating. I will have another look at this, when I find time. Thank you for the quick response!
Actually, a workaround seems to be:
dlv debug SOME_FOLDER --build-flags "-mod=vendor"
(omitting the equal sign).
However, I did not find a way to specify ldflags
also, but I think in debugging scenarios this is not that important.
Hi,
first of all, thank you for providing go-dlv. I was able to get up and running quire quickly with it. However, I have an issue debugging an application with a more sophisticated command line call. For instance, I have a call like this:
This works just fine, when executed from a shell but when I paste this to the minibuffer opened by the
dlv
emacs function, I getDo you have any idea, what am I doing wrong?