EpicGamesExt/raddebugger

Infer source locations from past alternatives

Closed this issue · 2 comments

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.

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?

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.