microsoft / TypeScript-React-Native-Starter

A starter template for TypeScript and React Native with a detailed README describing how to use the two together.
MIT License
1.91k stars 211 forks source link

breakpoints in tests don't work in VSCode #2

Open JReinhold opened 7 years ago

JReinhold commented 7 years ago

Using VSCode to debug tests. Setting breakpoints in the test-files doesn't work, and just gets ignored. Interestingly, inserting debugger; into the tests works fine.

This is my launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Debug Jest",
            "program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
            "args": ["--runInBand", "--no-cache"],
            "cwd": "${workspaceRoot}",
            "console": "integratedTerminal",
            "sourceMaps": true,
            "smartStep": true
        }
    ]
}