0

I wrote a node.js module in C++ with Visual Studio. I created the project with node-gyp configure --debug. This seems to work fine and I can compile my code and a loadable binary is created in the Debug folder. I am then able to require('./build/Debug/mymodule) this file from a server.js file and when I start the server from the command line (node server.js), the module runs. But I am struggling to figure out how to attach the Visual Studio Debugger.

According to this question it sounds like gdb is automatically attached (?), but how do I invoke my server.js with the Visual Studio debugger?

Edit: I run Visual Studio 2015 and node v4.1.2

4

1 回答 1

0

好像我想通了。

  1. 转到:项目->属性
  2. 打开“配置属性”下的“调试”选项
  3. 设置你的 node.js 安装路径和你的“server.js”的路径(或者你称之为文件的任何东西)
  4. 直接从 Visual Studio 使用绿色调试按钮启动节点

于 2015-11-25T14:05:21.510 回答