EpicGamesExt / raddebugger

A native, user-mode, multi-process, graphical debugger.
MIT License
3.54k stars 182 forks source link

File Path Mapping don't work; Duplicate mappings are added; File path is partly lower case #361

Open Takao-7 opened 3 days ago

Takao-7 commented 3 days ago

I'm debugging a UE4 developer build on the Epic Games Launcher.

Finding files by name is possible without issues. However, when I add a brakepoint anywhere it's hit, I'm getting the message that the file couldn't be found. As the build is from a build sever, the initial path to the project is of course different. I'm also noticing that half the path is in lower case, including the file name, while the rest isn't. Note that the path and file name is NOT lower case in the project.

If I then navigate to the file, it's opened.

Issue 1: The view is not focused on the brakepoint.

Issue 2: If you step over, the message re-appears again. This makes debugging impossible. Note that the file (it's an engine file) here is different.

Issue 3: If you add the file, an identically mapping will be added to "File Path Map".

The mapping is between the build Perforce root directory for the project on the build machine and my local Perforce root directory. Both directories have the "UE4" sub-folder.

Issue 4: The mapping doesn't work. This is in both cases: The mapping is between the root directories and if I manually add "/UE4" to the mapping path of both the source and destination.

Takao-7 commented 3 days ago

I found a way (workaround?) for this to work. I had to add two additional mappings:

  1. [Build Machine Perforce Root Folder]/UE4/Engine/Source/
  2. [My Local Perforce Root Folder]/UE4/Games/[GameName]/Source/

So three mappings in total.

ryanfleury commented 3 days ago

Hmm. So, if there is a mapping from [Build Machine Perforce Root Folder] -> [My Local Perforce Root Folder], then any time the debug info references anything under the former, it should be remapped to the latter. Can you clarify which mapping you initially had, which wasn't working? You had specified [Build Machine Perforce Root]/UE4 -> [Local Perforce Root]/UE4, and it was not mapping correctly?

To further diagnose this, it would help if I had your user and project files. They are located in %appdata%/raddbg.

Takao-7 commented 18 hours ago

The initial mapping that doesn't work is from [Build Machine Perforce Root Folder] -> [My Local Perforce Root Folder]. It's the one that is automatically added after selecting a file for the first time.

However, I just found out that this isn't consistent. I deleted both, the user and project file, started the game and selected the source file when asked. A mapping between the root folders was made and I was able to debug the game without issues. Both with a engine file and a game file.