How to debug node.js addons in xcode

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:

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:

  1. Select Info -> Executable -> Other and enter path to node executable
  2. Select Arguments and enter full path to the javascript file which invokes native addon.

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: How to debug node.js addons in xcode

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据