P
P
popup2018-09-03 21:28:13
JavaScript
popup, 2018-09-03 21:28:13

How to display nested JS object in VS Code debug console?

Good day.
Is it possible to somehow force VS Code to output nested objects into each other in its debugging console , as for example Node.js can do it on the command line or Chrome in the console, by type:

var list = {
  value: 1,
  rest: {
    value: 2,
    rest: {
      value: 3,
      rest: null
    }
  }
};
console.log(list);

VS Code
5b8d7c7b0569d623959189.png
node.js terminal
5b8d7c80c88e3076037513.png
Chrome developer tools
5b8d7c89ca8c2529515974.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
popup, 2018-09-04
@popup

upd. I didn't find how to do it by standard means /cry
But there is a way - to use the plugin: Debugger for Chrome .
To run the project, you need a web server, I ran it through LiveServer .

Result
5b8e73cde2024492163322.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question