I recently started programming native addons but couldn’t find how to debug them easily. After couple nights, I found very easy solution described below.
To debug native addons generate an xcode project file. From the root of your project (where
binding.gyp lives) run:
node-gyp configure -- -f xcode
This will create
./build/binding.xcodeproj folder, which you can open:
Once project is opened, make sure to configure the scheme. Open
Product -> Scheme -> Edit Scheme, and then:继续阅读