1

I am trying to npm install Node's pcap module on Windows 7 with Python 2.7 and VS 2013.

For that to work, MSBuild needs to find the Include/ and Lib/ folders of the WinPCap developer's pack.

I have tried these instructions to add include folders through VS2013's user-wide configuration file. Those changes are definitely picked up (if the XML is invalid, the build process dies even earlier).

I have also tried AdditionalIncludeDirectories (even though I cannot find it in the MSDN docs), like so:

<PropertyGroup>
    <!-- pcap is at: c:\dev\Include\pcap\pcap.h -->
    <AdditionalIncludeDirectories>c:\dev\Include</AdditionalIncludeDirectories>
</PropertyGroup>

...but the installer still complains that it cannot find pcap/pcap.h.

How can I make sure, it finds those files? (And is it really so hard to just add some system- (or user-) wide include settings for MSBuild or am I just being stupid?)

Community
  • 1
  • 1
Domi
  • 22,151
  • 15
  • 92
  • 122

1 Answers1

0

Ok,the visual studio works well on it,there is three steps. First, you need to build node with debug symbol.

type

$ node -v

to get the nodejs version,then go to nodejs.org release page,download the tarball and extract it.

enter the extracted folder, type

vsbuild.bat debug nosign x64

if success, you will get a Debug\node.exe with debug symbals

Second, you need reconfigure node-gyp with a --debug flag,Let it generate a visual studio solution file.

D:\fe\mbox_electron\node_modules\example>node-gyp configure rebuild --nodedir="D:\node-v5.1.1" --debug 

Third and the final, Open sln file with Visual Studio,and Configure debug parameters. enter image description here

then you can click debug button,set debug point,start debug

this article has more detail

bowman han
  • 1,097
  • 15
  • 25