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

Breakpoint not finding source file when using a registered transpiler #2101

Open
JustinGrote opened this issue Oct 10, 2024 · 0 comments
Open
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@JustinGrote
Copy link

JustinGrote commented Oct 10, 2024

Describe the bug
Continuation of microsoft/vscode-test-cli#9 (comment)

To Reproduce
Steps to reproduce the behavior:

  1. Make a debug config that uses esbuild/register to transpile the files with sourcemap enabled (you could use tsc-node or any other for this purpose)
  2. Set a breakpoint and run extension host to that file
  3. Breakpoint hits, opens editor to ephemeral transpiled TS file breakpoint. Sourcemap info is present

Expected: It would open to the original file location specified in the sourcemap, not the ephemeral version produced via the register transpiler.

Of note, the editor window shows the URL of the file "correctly", even though this isn't the actual content of the file.
Image

Log File

vscode-debugadapter-7381afb9.json.gz
(nothing obvious in the DAP logs)

VS Code Version: 1.94.1

Additional context
Decoded base64 of the sourcemap:

{
  "version": 3,
  "sources": ["c:\\Users\\jgrote\\Projects\\vscode-adapter\\test\\extension.test.ts"],
  "sourcesContent": ["import { workspace } from \"vscode\"\n\ndescribe('test', () => {\n\tit('test', async () => {\n\t\tawait workspace.getConfiguration('editor').update('tabSize', 8, true)\n\t\tconst actual = workspace.getConfiguration('editor').get('tabsize')\n\t\tactual?.should.equal(8)\n\t})\n})\n"],
  "mappings": ";;AAAA,oBAA0B;AAE1B,SAAS,QAAQ,MAAM;AACtB,KAAG,QAAQ,YAAY;AACtB,UAAM,wBAAU,iBAAiB,QAAQ,EAAE,OAAO,WAAW,GAAG,IAAI;AACpE,UAAM,SAAS,wBAAU,iBAAiB,QAAQ,EAAE,IAAI,SAAS;AACjE,YAAQ,OAAO,MAAM,CAAC;AAAA,EACvB,CAAC;AACF,CAAC;",
  "names": []
}
@JustinGrote JustinGrote added the bug Issue identified by VS Code Team member as probable bug label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants