Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

util.inspect on Node.js 5.x.x Causing Issues

See original GitHub issue

I have a project that we use this module in. Upon making a request to createContainerIfNotExists, the project continues to execute as if the call happened but it does not. The module will eventually get to this line and stop:

self.logger.log(Logger.LogLevels.DEBUG, 'FINAL REQUEST OPTIONS:\n' + util.inspect(finalRequestOptions));

Calling util.inspect lands up eventually getting to this following block of code within node’s util.js:

function ensureDebugIsInitialized() {
  if (Debug === undefined) {
    const runInDebugContext = require('vm').runInDebugContext;
    Debug = runInDebugContext('Debug');

The last line, Debug = runInDebugContext(‘Debug’); lands up never returning and the promise that called it never returns/ends. This completely causes all debugging for the app that makes use of your module to stop working.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

yaxiacommented, Feb 24, 2016

@tSreeram Thanks for sharing. @atom0s I am going to close the issue. Please feel free to reopen it if the latest Nodejs doesn’t work for you. Thanks.

tSreeramcommented, Feb 18, 2016

I also faced similar util.inspect issue. But after upgrade to NodeJS 5.6 (latest) the debugger issue is resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Better support for Error.cause in util.inspect / console.log #40859
Is your feature request related to a problem? Please describe. Given this code: const one = new Error('one'); const two = new Error('two', ......
Read more >
Util | Node.js v19.3.0 Documentation
A string representation of an object with generic JavaScript object formatting. Similar to util.inspect() with options { showHidden: true, showProxy: true } ....
Read more >
What is util.inspect() in Node.js? -
Nodejs provides a utility function for debugging called util.inspect() . util.inspect() returns a string representation of the object passed as a parameter ...
Read more >
How to Debug Node.js Code Using Multiple Tools - Kinsta
This tutorial demonstrates various tools to debug node applications and find their root causes. Dig in and learn from the ground up.
Read more >
How to Debug a Node.js Application: Tips, Tricks and Tools
js application will fail. If you're lucky, your code will crash with an obvious error message. If you're unlucky, your application will carry...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found