I’m trying to set up an C++ project in Xcode that uses a Makefile to build.
I got it working by starting with a completely empty project (Empty template), adding an External Build System target and setting up the paths correctly:

However breakpoints don’t work. I created a very simple test project with a single .cpp file, but no matter what I try, the breakpoint is ignored:

As suggested in an other question, I tried to go to Product -> Edit Scheme… and check ‘use custom working directory’ and I set this to the same directory as the executable, but it didn’t help.
All my files (source, makefile, executable, project file) are in a single folder in Finder (and in Xcode too).
If it matters my Makefile is very simple too:
BUILD = .
TARGET = $(BUILD)/test
all:
g++ test.cpp -o $(TARGET)
Add
-gswitch to the gcc command to include debugging symbols like this:EDIT: And chose another target name because test is a shell built-in command in most shells and you might run into trouble invoking your program from the command line (even if I’m not sure about Mac OS).