-
Notifications
You must be signed in to change notification settings - Fork 342
Description
Describe the bug
When I set "program" to a typescript file, the debugger tries to find the compiled output and if it manages to, overwrites the value with the found javascript file.
Relevant code is here. Apparently related issue is #291.
This is completely undocumented and unexpected. Looking at the code, there doesn't seem to be any way to disable this behavior. Even if the predictor isn't sure what the source is (it finds multiple candidates), it just picks the first one.
If I set the program to a typescript file, it's because I want to debug the typescript file. If there happens to be built output there, it's probably out of date. It's not at all obvious that the old built code is being executed instead of the fresh source.
The original assumptions no longer apply, since Node itself can run typescript. Even at the time, it was noted that other runtime possibilities exist, but the code does not check the runtime value.
To Reproduce
Steps to reproduce the behavior:
- Create a launch config with "program" set to a typescript file
- Compile the typescript file with sourcemaps
- Start debugging
- The debugger substitutes the program value with the built path instead
VS Code Version:
1.107.1 (Universal)
Commit: 994fd12f8d3a5aa16f17d42c041e5809167e845a