Skip to content

update instructions to build using only MSYS2 and debug using vscode #4128

@FuPeiJiang

Description

@FuPeiJiang

this should maybe be a PR instead

prerequisites: pacman -S --needed base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-curl mingw-w64-x86_64-pcre2

build:
cmd.exe

set MSYSTEM=MINGW64
make

git-sdk-64/ is 6.35 GB
msys64/ is 1.21 GB


set MSYSTEM=MINGW64 and packages mingw-w64-x86_64-curl mingw-w64-x86_64-pcre2 were what were missing for me


debugging:

I wasn't able to build using visual studio, but I was able to debug using vscode (gdb) so I'm fine
maybe add this to wiki/README too, next to visual studio
: you can debug using vscode (gdb), here is a sample launch.json config

{
  "name": "(gdb) C git",
  "type": "cppdbg",
  "request": "launch",
  "program": "${workspaceFolder}\\git.exe",
  "args": [
    "rev-parse",
    "HEAD",
  ],
  "stopAtEntry": true,
  "cwd": "${workspaceFolder}",
  "environment": [],
  "externalConsole": false,
  "MIMode": "gdb",
  "setupCommands": [
    {
      "description": "Enable pretty-printing for gdb",
      "text": "-enable-pretty-printing",
      "ignoreFailures": true
    }
  ],
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions