Skip to content

Debug TypeScript VS Code #7886

@mscottx88

Description

@mscottx88

🐛 Bug Report

I cannot debug the code under test in jest. I can for the most part debug the actual jest spec file, but when I attempt to drill into the code which is actually being called, it amounts to seeing the VS Code editor pull up the source, with the "current line" always at the bottom of the screen.

I can step through the program logic, seeing the Local Variables changing, return values etc. but the actual stepping through the logic and seeing the lines of code executing is not working. Line breaks do not work.

This is for a TypeScript project, not JavaScript.

To Reproduce

Write a TypeScript module.
Write a TypeScript jest spec file.
Put a breakpoint in the TypeScript module under test (not the jest spec).
Press F5.
No breakpoints ever reach.

Expected behavior

Debugging works.

Run npx envinfo --preset jest

Paste the results here:

npx: installed 1 in 7.299s

  System:
    OS: Linux 4.4 Ubuntu 16.04.4 LTS (Xenial Xerus)
    CPU: (4) x64        Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
  Binaries:
    Node: 8.10.0 - ~/.nvm/versions/node/v8.10.0/bin/node
    Yarn: 1.12.3 - /usr/bin/yarn
    npm: 5.6.0 - ~/.nvm/versions/node/v8.10.0/bin/npm

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions