To reproduce (on node v18.16.1 with VSCode 1.80.1):
- npm i
- Set a vscode breakpoint on package/src/add.ts#2.
- Run the Debug Jest Tests launch configuration.
- Observe that the breakpoint is hit twice:
- When the module is loaded (unexpected).
- When the function is executed (expected).
VSCode seems to find two possible breakpoint locations:
{"tag":"dap.receive","timestamp":1689974853326,"metadata":{"connectionId":3,"message":{"command":"breakpointLocations","arguments":{"source":{"name":"src/add.ts","path":"src/add.ts","sourceReference":0,"origin":"Skipped by smartStep"},"line":2},"type":"request","seq":19}},"level":0}
{"tag":"dap.send","timestamp":1689974853327,"metadata":{"connectionId":3,"message":{"seq":1140,"type":"response","request_seq":19,"command":"breakpointLocations","success":true,"body":{"breakpoints":[{"line":2,"column":3},{"line":2,"column":16}]}}},"level":0}