Home > Blockchain >  VS Code Mac m1 Debug is not hitting my breakpoints with Makefile conf C language
VS Code Mac m1 Debug is not hitting my breakpoints with Makefile conf C language

Time:05-07

Hello !

I'm new with using VS Code while programming in C language and I'm trying to debug my program with the "Makefile Tools" plugin but it doesn't seem to consider any of my breakpoints.

Config/Environment:

  • Mac M1 2021, MacOS Monterey
  • C programming language
  • Makefile compilation (GCC)
  • Run: ./binary test_file

Here are the steps I've done:

  • First I downloaded C/C IntelliSense and Makefile Tools for VS Code.
  • Then I configured it using the documentation, as follow:
{
    "makefile.extensionOutputFolder": "./.vscode",
    "makefile.configurations": [
        {
            "name": "Default",
            "makeArgs": []
        },
    ],
    "makefile.launchConfigurations": [
        {
            "cwd": "/Path/to/workdir",
            "binaryPath": "/Path/to/binary",
            "binaryArgs": [
                "/Path/to/test_file"
            ]
        }
    ],
    "C_Cpp.default.configurationProvider": "ms-vscode.makefile-tools"
}
  • I selected in the tree my binary and rules: like this

  • Finally I build then run and my breakpoint doesn't get hit.

Maybe some clues can be found in this log, I'm not sure:

2022-05-06 15:04:22.645419 0200 fdf[99469:2207846] [default] error finding potential wrapper bundle for node <FSNode 0x60000021c0a0> { isDir = ?, path = '/Users/julian/Documents/42/fdf' }: Error Domain=NSOSStatusErrorDomain Code=-10811 "kLSNotAnApplicationErr: Item needs to be an application, but is not" UserInfo={_LSLine=1579, _LSFunction=wrapperBundleNodeForWrappedNode}

But I've found nothing about it on the internet.

Can someone help me with using the debug mode in VS Code ?

CodePudding user response:

Are you compiling with -g flag in your Makefile?

  • Related