dnSpyEx / dnSpy

Unofficial revival of the well known .NET debugger and assembly editor, dnSpy
GNU General Public License v3.0
7.02k stars 462 forks source link

Harmony patch and transpile support #332

Open t1a2l opened 5 months ago

t1a2l commented 5 months ago

Problem Description

today if you patch function, if i prefix or postfix it i cant breakpoint on the original function, also when trnspiling a function i cannot see the new generated function that has been transpiled, to see if my transpile worked correctly.

Proposal

allow breakpoint in original function, show generated transpiled function. (maybe allow debug).

Alternatives

No response

Additional Context

No response

GazziFX commented 5 months ago

IIRC Harmony uses Mono.Cecil as backend (not really dynamic method), so you need somehow locate in-memory module which contains your patch. Breakpoints isnt working because even if you patching with prefix and postfix it creates transpiled method and put jump on original and it will never be called

t1a2l commented 5 months ago

@GazziFX @ElektroKill Someone created a tool that show a preview of what the code of the result of the transpiler will look like. so even this will be enough. https://github.com/Zetrith/Remodder I just rather not use jetbrains because it is not free, and I prefer this tool better.