nwdc v1.0.1
nwdc
Simple script and binary to display Node.js and Chromium console messages in the terminal, when launching NW.js applications from the Windows command line.
Normally, when running the NW.js SDK in Windows, the nw executable immediately forks a new process and quits. This prevents being
able to monitor the terminal for console logs or other messages from Chromium. When launching an NW.js application via nwdc,
a wrapper process is kept running that will display output from the main Node.js process and all spawned Chromium windows.
Usage For Development Environment (With Node.js Installed)
Install the NW.js SDK:
a. Add
nw@0.60.0-sdk(choose the desired version) to thepackage.jsonfile of the NW.js application being developed.b. Download the SDK from https://nwjs.io/downloads/ and extract it to a directory within the
PATHenvironment variable.Add
nwdcto the NW.js application being developed:Yarn:
yarn add nwdcNPM:
npm i nwdcRun the NW.js application using
npx nwdc .instead ofnw ..Press CTRL+C or close your NW.js application normally, to stop the
nwdc.exeprocess.
Usage For Production Environment (Without Node.js Installed)
Download the SDK from https://nwjs.io/downloads/ and extract it to a directory within the
PATHenvironment variable.Download a pre-built
nwdc.exebinary from Releases or build one manually:yarn && yarn buildNOTE: It is useful to copy the
nwdc.exefile to the same directory as NW.js, so it can be executed without providing the full path.Run your NW.js application using
nwdcinstead ofnw.Example #1 -- From NW.js application directory when
nwdc.exeis not inPATH:C:\Users\Me\Downloads\nwdc.exe .Example #2 -- From external directory when
nwdc.exeis inPATH:nwdc C:\Users\Me\Documents\Code\MyApp\Press CTRL+C or close your NW.js application normally, to stop the
nwdc.exeprocess.