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

Infer source locations from past alternatives #112

Closed
npiegdon opened this issue Jan 24, 2024 · 2 comments
Closed

Infer source locations from past alternatives #112

npiegdon opened this issue Jan 24, 2024 · 2 comments

Comments

@npiegdon
Copy link

There is a convenience I enjoy in VS that would also be nice to have here.

The source file locations in my PDBs point to temporary CI build folders that have since been moved to longer-term backup locations. The "Find alternative..." prompt in raddbg already makes debugging in this case possible, but it prompts again for each alternative source location. Something VS seems to do is use previously specified alternative paths to guess at future alternatives.

This works perfectly in the "moved the entire folder" case where you end up only having to specify a single alternative and the rest are found automatically by comparing the relative paths. (And in the event that doesn't find an automatic match, it simply falls back to the regular alternative prompt.)

Thanks! This tool is already amazing.

@npiegdon
Copy link
Author

Er... it looks like the "File Path Map" feature (that I just discovered) is already 98% of what I was hoping for. Perhaps this should be titled something closer to "Automatic File Path Maps" where it tries to infer a path map one level higher than the individual source file?

@ryanfleury
Copy link
Collaborator

I've improved this in 77190c4. Instead of just having the "Find Alternative" button pick a replacement for a single file, it'll now try to override the common root directory between the source and destination paths, e.g.:

  • C:/foo/bar/baz.c mapped to D:/foo/bar/baz.c will cause an override of C: -> D:
  • C:/1/2/foo/bar.c mapped to C:/2/3/foo/bar.c will cause an override of C:/1/2 -> C:/2/3
  • C:/foo/bar/baz.c mapped to D:/1/2/3.c will cause an override of C:/foo/bar/baz.c -> D:/1/2/3.c
  • (and so on)

Let me know if you run into any issues with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants