I am trying to use the debugger but I can't get it to work. This minimal sample repo shows how I set up my project.
- Use basic
tsconfig.jsonfile. - Install stuff from npm
(
npm i --save-dev typescript jest babel-jest @babel/core @babel/preset-env @babel/preset-typescript @jest/globals). - Create
babel.config.jsas recommended. - Create a basic file (
run.ts). - Create a test file (
run.test.ts).
- Open Google Chrome and go to
chrome://inspect/#devices. - Click on "Open dedicated DevTools for Node".
- Run the program with
node --inspect-brk run.ts - Wait a few seconds
- Boom, the debugger window picks up the code and everything is good to go.
- Same as above, but run
node --inspect-brk ./node_modules/jest/bin/jest.js --runInBandinstead. - The debugger attaches, but none of the source code is there.
- Now what?
Note that the only file picked up in the left-hand side is jest.js. The debugger does not know about any of my source files.
I also tried adding --require ts-node/register to the command (after npm i --save-dev ts-node). After that, it picks up a bunch of files in node_modules, but none of my actual source files.
I also added "soruceMap": true to my tsconfig.json, but that didn't seem to have any effect.
Here is a Stack Overflow question that I asked about this, with no response and 1 close vote as of 02/09/26.
Here is a GitHub issue that I opened against Jest about this.

