This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Working with fsevents_win.node
Bryan Chin edited this page Feb 5, 2014
·
1 revision
To support recursive file watching on Windows, Brackets uses a native Node.js addon, called fsevents_win
. This page describes how to build and debug this node module.
Node.js addons are described in more detail here: http://nodejs.org/api/addons.html
- Node.js
- into the root of your c: drive,
git clone https://github.com/joyent/node.git
. If you choose to clone node into a different folder, you'll need to change the Visual Studio project settings later to point to the correct location. - using a DOS command prompt, run
vcbuild release nosign
from the c:\node folder -
git checkout v0.10.24
(or whichever version of Node currently used by Brackets)
- Node-inspector
npm install -g node-inspector
- Microsoft Visual Studio 2010 or 2012 (Express)
cd brackets/src/filesystem/impls/appshell/node/node_modules/fsevents_win
- to create the VS project, run
node-gyp configure
ornode-gyp configure --debug
to build the Release or Debug builds offsevents_win.node
, respectively node-gyp build
Note: to use the Debug build, you'll need to edit fsevents_win.js
and change the line
var binding = require('./build/Release/fswatch_win');
to
var binding = require('./build/Debug/fswatch_win');
- from a git bash window, run Node Inspector using
node-inspector &
- launch Brackets
- Debug / Enable Node Debugger
- launch Chrome. Browse to the URL displayed from Node Inspector after running step (1) above. This will allow you to step thru
fsevents_win.js
. - launch VS 2010. Open build\binding.sln.
- Debug / Attach to process... In the resulting dialog, find node.exe and click Attach. This will allow you to step thru
fsevents_win.cpp
.