-
Notifications
You must be signed in to change notification settings - Fork 72
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
"Run/Debug As" > "Node program" for Typescript file may launch wrong Javascript file #1366
Comments
Would you be able to provide a PR illustrating this in a test case and fixing it? |
Sounds like a plan. I'll give it a try. |
Submitted #1368 as a quick-fix, but that doesn't mean we can't do better by using the debug adapter feature directly ;) |
@AndrewFerr @mickaelistria WWD should run |
@wesleybl Yes, the debug should be in the TS file, or in your case, the source JS file instead of the Webpack-generated JS file. Did you enable source maps in your Webpack config? If so, then perhaps the debug adapter is aware of only TS->JS mappings. |
Downloaded the snapshot & verified that the quick fix works, thanks! |
Depending on the layout of project files &
tsconfig.json
, trying to run a Typescript file may fail to find the correct path of that file's associated Javascript file, and thus fail to run the file.For example, excluding
node_modules
and lockfiles, I have a project directory of:and a
tsconfig.json
ofWhen trying to run
./src/main.ts
, WWD should run./lib/main.js
, but it instead launches./lib/src/main.js
, which doesn't exist.It seems that WWD constructs the path of the Javascript file to run as
but it should be
where I've used Bash to illustrate the path construction.
The text was updated successfully, but these errors were encountered: