Questions tagged [console.dir]
10 questions
5
votes
1 answer
Jest and console.dir not displaying entire object
I am trying to display an error within a Jest test but it won't show me all of the levels.
import util from 'util'
describe('Module', () => {
it('should show all levels WITHOUT util', () => {
const large = {
level1: {
level2: {
…

Carlton
- 5,533
- 4
- 54
- 73
2
votes
1 answer
JavaScript console.dir and runtime
I'm trying to use an object for javascript to hold my main elements etc. And my object will grab contents from the HTML elements. And I'm trying to use console.dir to see if my data is grabbed correctly.
The issue is, console.dir shows all values at…

zbgokalp
- 163
- 1
- 2
- 11
0
votes
1 answer
[[SCOPES]] missing on chrome dev tools
If i run console.dir(..) for a fn, chrome does not display the [[SCOPES]] on the dev tools anymore at least since the December 6th update! It shows on EDGE(ms).
chrome version 108.0.5359.125
this prevents me from getting the closure...

dechman
- 3
- 2
0
votes
0 answers
How come when I console log a DOM element in VS code, I sometimes receive an HTML like tree and sometimes I receive JSON properties
I am new to the DOM and I am console logging things so I can see what my code is doing to my website without implementing it right away.
I have read the documentation about console.log and console.dir
I am confused because I am using VS code and…

jbans
- 1
0
votes
0 answers
Why does console.dir output a stacktrace on an Error object?
Today I encountered some behavior that really threw me for a loop while debugging, because at first I really didn't understand what I was looking at. After a lot of trial and error I came to understand that console.dir has some unusual behavior with…

temporary_user_name
- 35,956
- 47
- 141
- 220
0
votes
0 answers
How do i get parameter content of console
I have a form populated by ajax, and for manipulation of the frontend, I'm trying to something happen when the div has content, but I can't see the content of the div...only with the console.dir, like the picture, so my questions is how do I…

rui_sonika
- 45
- 6
0
votes
1 answer
how do I read a series of JavaScript literals with node.js?
I have a log file that looks something like
log.txt
{ timestamp: '2019-10-24 04:39:26',
referer: 'websocket',
switch:
{ program:
'elephant',
preview: 'gopher',
id: 1571891966523 } } }
{ 'switch-type':…

David Cary
- 5,250
- 6
- 53
- 66
0
votes
0 answers
Assign results for console.dir
Is there a way to read/assign the results of console.dir(object) into a variable for processing in my own javascript code?
Thanks in advance.

klng
- 11
- 2
-1
votes
1 answer
Find out what functions exists inside an object
I have written code like in below mentioned fiddle:
https://fiddle.sencha.com/#fiddle/1d3r
You can see at the end of the code record.get('text').
How to find the functions which I can use from inside an object?
I tried console.dir in chrome and saw…

Hacker
- 7,798
- 19
- 84
- 154
-2
votes
1 answer
Open a .dir file using any python
I have a file with .dir extension. I tried opening it but getting unknown/unreadable characters. I also tried opening it using python and java but not able to get the correct encoding/decoding for the characters in file. Can someone help me in this…

Mal
- 1