whs.js icon indicating copy to clipboard operation
whs.js copied to clipboard

DebugModule

Open thejmazz opened this issue 7 years ago • 3 comments

https://github.com/visionmedia/debug

it can be a help to have a trace of steps when debugging problems - in general console.log helps in these cases. it can also be really useful for bug reports.

with environment variables, can turn on/off debugging for certain debug statements

might be tricky, but can probably remove from "prod" build where no console debugging is necessary.

in general, might make it easier to maintain code. esp. since graphics can sometimes be a lot of trying different things out and leaving old settings commented.

Version:
  • [x] v2.x.x
  • [ ] v1.x.x
Issue type:
  • [ ] Bug
  • [x] Proposal/Enhancement
  • [ ] Question
  • [ ] Discussion

Tested on:
Desktop
  • [ ] Chrome
  • [ ] Chrome Canary
  • [ ] Chrome dev-channel
  • [ ] Firefox
  • [ ] Opera
  • [ ] Microsoft IE
  • [ ] Microsoft Edge
Android
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Opera
IOS
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Opera

thejmazz avatar Mar 24 '17 03:03 thejmazz

@thejmazz to handle errors correctly in node.js?

sasha240100 avatar Mar 25 '17 06:03 sasha240100

I thought about replacing console.log. We can do that

sasha240100 avatar Mar 25 '17 06:03 sasha240100

Not just for Node, but just b/c it allows toggling debug logs with environment variables. could have different logs turned off for different test cases for example, or if you need to debug a specific problem

thejmazz avatar Mar 25 '17 21:03 thejmazz