Subject: Re: [PATCH V1 1/1] contrib/vscode/: debugging with VS Code and gdb

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Wed, 06 Apr 2022 10:47:16 +0200

On Wed, Apr 06 2022, COGONI Guillaume wrote:

> +Using the integrate debugger can be particularly helpful to understand how Git works internally.
> +It can be used to isolate some parts of code, with this you may be able to ask more precises
> +question when you are stuck. (See getting-help sections).
> +A script that creates the configuration files is available in contrib/vscode/init.sh. Useful links
> +and explanation of how to use the script are available in contrib/vscode/README.md.
> diff --git a/contrib/vscode/README.md b/contrib/vscode/README.md
> index 8202d62035..f383c95e1f 100644
> --- a/contrib/vscode/README.md
> +++ b/contrib/vscode/README.md
> @@ -6,7 +6,11 @@ code editor which runs on your desktop and is available for
>  [Windows](https://code.visualstudio.com/docs/setup/windows),
>  [macOS](https://code.visualstudio.com/docs/setup/mac) and
>  [Linux](https://code.visualstudio.com/docs/setup/linux). Among other languages,
> -it has [support for C/C++ via an extension](https://github.com/Microsoft/vscode-cpptools).
> +it has [support for C/C++ via an extension](https://github.com/Microsoft/vscode-cpptools) with
> +[debugging support](https://code.visualstudio.com/docs/editor/debugging)
> +
> +To get help about "how to personalize your settings" read:
> +[How to set up your settings](https://code.visualstudio.com/docs/getstarted/settings)
>  

The upthread "How did you generate this patch" question from Matthieu
still seems to apply. I.e.:

>  To start developing Git with VS Code, simply run the Unix shell script called
>  `init.sh` in this directory, which creates the configuration files in

This context is something that's not there in the file on "master".

I really don't mind having some guide for VSCode in our developer
documentation, but I think if we (as a free software project) are
recommending proprietary software we should put that in some context
where we explain if/why it's needed, and if free alternatives are also
suitable.

I haven't used the VSCode integration you're documenting, but from the
diff and the "gdb" mention I gather that this isn't using some "native"
debugger of MSVC/VS's, but just using the VSCode editor as a wrapper for
gdb?

If that's the case wouldn't it suffice to link to some generic getting
started guide for debuggers? And e.g. recommend the GDB manual, maybe
there's a better online reference (I read it locally), but e.g.:
https://www.sourceware.org/gdb/current/onlinedocs/gdb.html

Then if we're recommending GUI wrappers those are a dime a dozen,
e.g. Emacs's GUD mode:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Debuggers.html