Hello there!
I have been trying to attach a gdb debugger to a launched game instance from PowerShell. I think I have almost done it but I have missed something.
Here is what I did:
First checked that I have gdb in my system. Then I configure a debug task in launch.json as it’s explained in the documentation. After that my configuration inside launch.json looked like this:
{
"name": "(gdb) Debug attach",
"type": "cppdbg",
"request": "attach",
"program": "C:\\FastEpicGamesLibrary\\UE_4.26\\Engine\\Binaries\\Win64\\UE4Editor.exe",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"miDebuggerPath": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Some description",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
The final step is to launch de debug and try to attach it to the process of the instance I’ve previously called. That’s when this window appears:
I have been able to attach it to other processes but maybe an unreal game instance is different and I have to attach it to the terminal instead of the proper game or something tricky I can’t even imagine.
I launched the game instance with the following command in powershell:
&“C:\FastEpicGamesLibrary\UE_4.26\Engine\Binaries\Win64\UE4Editor.exe” “D:\VideoGamesProjects\PuzzlePlatforms\PuzzlePlatforms.uproject” -game -log