protonscr

Attaching winedbg to Proton for debugging

protonclosed
ValveSoftware/Proton#3484 · opened 2020-01-31 by abelbriggs1 · updated 2021-04-15 · 4 comments · github
2 matching comments, n / p to jump
Aabelbriggs1 2020-01-31 github

Hi,

I'm trying to attach the Wine debugger to Proton so I can look into a game's code during runtime.

When I run winedbg, the info process command does not contain the game process that I'm trying to look into. For example:

Wine-dbg>info process
 pid      threads  executable (all id:s are in hex)
 0000000e 8        'services.exe'
 0000001e 7        \_ 'winedevice.exe'
 00000019 3        \_ 'plugplay.exe'
 00000011 4        \_ 'winedevice.exe'

This happens regardless of whether I run the Proton 4.11 winedbg or my normal Wine installation winedbg.

I've searched around for a few hours through the issue tracker and though I've found plenty of evidence of people looking into Proton games with winedbg, I've been completely unable to find any documentation of how they did so. Indeed, the closest I came was finding someone who had a similar problem trying to debug with winedbg. However, their issue was solved without the need for that information.

Additionally, I've seen references to a "proton_winedbg_run" script which I imagine does what I want, but it seems to be non-existent in my Proton installation.

Any help would be appreciated. Thanks.

Linux Mint 19.2 Cinnamon
Kernel version 5.1.16
Kkisak-valve maintainer 2020-01-31 github

Hello @abelbriggs1, adding PROTON_DUMP_DEBUG_COMMANDS=1 %command% to a game's launch options, then running the game adds a some convenience scripts to /tmp/proton_<username>/, including winedbg_run, which sounds like the script you're looking for.

Aabelbriggs1 2020-01-31 github

Hello @abelbriggs1, adding PROTON_DUMP_DEBUG_COMMANDS=1 %command% to a game's launch options, then running the game adds a some convenience scripts to /tmp/proton_<username>/, including winedbg_run, which sounds like the script you're looking for.

Thanks, that's exactly what I was looking for and it works perfectly. I must have missed that when looking at launch options.

Mmarcussacana 2020-09-25 github

If possible will be cool if someone write this in the FAQ, I don't found many results too about debugging.

CCygnusTerminal 2021-04-15 github

Trying to debug a game, i only get:
Can't attach process 000a: error 87
syntax error

Proton versions

Launch options

Upstream links