debug: DEBUG_DEPTH not working

DEBUG_DEPTH env var has no effect. I tried values of 10, 100, null. No matter what I always get the following display:

2020-02-08T22:17:01.423Z SCOPE STRING [ { email: 'xxx@yyy.com', vars: [ [Object] ] } ]

My invocation:

debug('STRING', targetObj);

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 18 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@Qix- now that the pandemic is over you think you could merge this? 😃 #926

I should have noted it reproduces only when deep object is the second argument to the debug function, e.g.

Yeah that’s much less simple to fix; there are a few bugs surrounding this. v5 is going to be a rewrite for the most part, so a lot of this will get addressed then.

Glad to know it works now (mostly); I’ll commit it in sometime soon. Thank you very much for testing @anishkny 😃

@Qix- I have created a PR https://github.com/debug-js/debug/pull/911 for this fix.

It comes with tests as well.

What is the status on this issue?

image