Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to debug imported variables under VSCode debugger #270

Closed
1 task
npdev453 opened this issue Jul 16, 2023 · 5 comments
Closed
1 task

Unable to debug imported variables under VSCode debugger #270

npdev453 opened this issue Jul 16, 2023 · 5 comments
Labels
duplicate This issue or pull request already exists outdated

Comments

@npdev453
Copy link

npdev453 commented Jul 16, 2023

Bug description

I aslo try:

  • different configuration of sourceMap flags and etc in launch and tsconfig
  • different versions of nodejs (16, 18, 20)

but it does not matter.

Seems like in runtime code debugMe will be looks like import_importMe.debugMe but sourceMap not refect that.

image

Reproduction

index.ts

import {debugMe} from './importMe'

console.log(debugMe);

importMe.ts

export const debugMe = Math.random();

Environment

System:
    OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: Inter
    Memory: 2.27 GB / 3.84 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.20.1 - /usr/bin/node
    npm: 8.19.4 - /usr/bin/npm
    pnpm: 8.6.6 - ~/.local/share/pnpm/pnpm
  npmPackages:
    tsx: ^3.12.7 => 3.12.7

Can you work on a fix?

  • I’m interested in opening a pull request to address this issue.
@npdev453 npdev453 added bug Something isn't working pending triage labels Jul 16, 2023
@privatenumber privatenumber added the duplicate This issue or pull request already exists label Jul 17, 2023
@privatenumber privatenumber removed bug Something isn't working pending triage labels Jul 17, 2023
@npdev453
Copy link
Author

npdev453 commented Jul 17, 2023

@privatenumber
could you please show related issue? And also please add it to roadmap

@privatenumber
Copy link
Owner

Away from computer now but try searching, there's a few IIRC.

Also, search the roadmap. It should already be on it.

@npdev453
Copy link
Author

Away from computer now but try searching, there's a few IIRC.

Also, search the roadmap. It should already be on it.

Mmm, double checked it again, maybe you know issue that indirectly related to that problem that I cant see.
I see some issues about imports and 'paths' or something, but seems like that absolutly not equal with that problem.

Also in Roadmap in section 'Debugging' is empty (mean nothing about that).

@privatenumber
Copy link
Owner

It's a debugger limitation, not tsx's limitation:
#98 (comment)

I don't think this is always possible to map, but you can open an issue with VSCode or Chromium.

@npdev453
Copy link
Author

Seems like vscode-js-debugger has some improved names recognition
microsoft/vscode-js-debug#1383

Also I find that tsc doest emit names for sourceMaps (for last 7 years) and after some tests iw got the same behavior.
microsoft/TypeScript#9627

__
I will leave this information for those who want to dive into extended debugging starting from tsx

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists outdated
Projects
None yet
Development

No branches or pull requests

2 participants