-
Notifications
You must be signed in to change notification settings - Fork 289
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
fix: source handling with remoteRoot #389
fix: source handling with remoteRoot #389
Conversation
Fixes #383. There were a two things that caused issues attaching to remote processes: 1. We requested sourcemaps from their remote location, which doesn't exist locally. This PR rebases the path correctly. 2. We used url length as the heuristic for which to narrow the 'correct' file at an absolute path. With a different remote root, though, the urls might be totally different. We now also check whether the original path is the sourcemap parent of the generated path. This was the problem in the linked issue, where ts-node was used.
74f7ec5
to
8c3cdb8
Compare
Should there be tests for this? |
Yea, I was thinking about how to do this, I think I can do it well enough by having a test with a duplicate of the workspace running the process out of |
I think that should be good enough. |
Yep, good reasoning. I unintentionally practiced proper TDD, by adding a test and not realizing I had changed back to |
Seems to be working great today :D |
Awesome thanks for confirming! |
Fixes #383. There were a two things that caused issues attaching to
remote processes:
exist locally. This PR rebases the path correctly.
file at an absolute path. With a different remote root, though, the
urls might be totally different. We now also check whether the
original path is the sourcemap parent of the generated path. This was
the problem in the linked issue, where ts-node was used.