TypeScript and Jest - debugger stops only on breakpoints in tests, never in source files


I am using TypeScript and Jest.

I have no issue to get debugger stop on proper line in the test file, but I cannot get it stopped in the source files.


This is my `jest.config.json`:


module.exports = {
collectCoverage: true,
collectCoverageFrom: ['src/**/*.ts'],
globals: {
'ts-jest': {
tsConfig: {
sourceMap: true,
inlineSourceMap: true
preset: 'ts-jest',
testEnvironment: 'node',


Any help?

Comment actions Permalink

Try changing collectCoverage to false - does it help?

"collectCoverage": false,

If the source file is instrumented for coverage, the generated code can't be mapped to source; it's a well known limitation

Comment actions Permalink

Elena Pogorelova God bless you for this. I'd been struggling to get this work for days. Thanks.


Please sign in to leave a comment.