0

I have node running inside a docker container and am exposing the debug port so I can connect directly.

However what I see inside the console differs from devtools.

docker-compose.yml

ports:
  - 4000:4000
  - 9229:9229

enter image description here

However it will display correct in DevTools if I console.info(JSON.parse(JSON.stringify(settings)))

How could I see the data without having to do this odd hack?

Jamie Hutber
  • 26,790
  • 46
  • 179
  • 291

1 Answers1

0

Console can output only string, so basically it transforms mongodb object to string, as long as DevTools shows live data as they are.

  • Thanks :) but it shows as a `object` with `model: [Object]`. So I have to convert it to string and then back into an object. – Jamie Hutber Apr 03 '20 at 10:37