From 82142279a5ee6575c9571c6553cf4e2dd8fbec8a Mon Sep 17 00:00:00 2001 From: Francis Gulotta Date: Sat, 15 Sep 2018 03:48:30 -0400 Subject: [PATCH] docs(debugging): add windows information --- docs/guide-debugging.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/guide-debugging.md b/docs/guide-debugging.md index 6aad802..303d605 100644 --- a/docs/guide-debugging.md +++ b/docs/guide-debugging.md @@ -3,7 +3,7 @@ id: guide-debugging title: Debugging --- -## `DEBUG=` +## Debugging Output We use the [debug](https://www.npmjs.com/package/debug) package and log under the `serialport` namespace. Each package has it's own scope @@ -13,12 +13,44 @@ We use the [debug](https://www.npmjs.com/package/debug) package and log under th You can enable logging through environment variables. Check the [debug](https://www.npmjs.com/package/debug) docs for info. +### linux, osx ```bash -DEBUG=serialport/main node myapp.js +DEBUG=serialport/stream node myapp.js DEBUG=serialport/* node myapp.js DEBUG=* node myapp.js ``` +### Windows command prompt notes + +#### CMD + +On Windows the environment variable is set using the `set` command. + +```cmd +set DEBUG=serialport/* +``` + +Example: + +```cmd +set DEBUG=serialport/* & node myapp.js +``` + +#### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. + +```cmd +$env:DEBUG = "serialport/*" +``` + +Example: + +```cmd +$env:DEBUG='serialport/*'; node app.js +``` + + ## Core dumps You can enable core dumps on osx with;