JSDOM source code debugging

69 views
Skip to first unread message

Devin McIntyre

unread,
Oct 11, 2019, 6:09:16 PM10/11/19
to jsdom
I am experimenting with JSDOM, and I immediately ran into a problem with debugging. I am accustomed to being able to put debug points in my source code during unit testing. How can I get this to work with JSDOM?
  1. I am obeying https://github.com/jsdom/jsdom/wiki/Don't-stuff-jsdom-globals-onto-the-Node-global .
  2. If I run using the Webstorm debugger, I can only debug by placing the the debug points inside spec files and using "Force Step Into" to reach the code. When the code is reached, the file name is not displayed.
  3. I have tried the advice at https://nicedoc.io/jsdom/jsdom#debugging-the-dom-using-chrome-devtools. When running with --inspect=127.0.0.1:9229, my spec files appear in the Chrome dev tools under "Sources" but all that shows up for the source files are some weird folders named "xml/1.0" and "xmlns/1.0". I can, again, only debug by placing points into the spec files and then stepping in.
Reply all
Reply to author
Forward
0 new messages