dnSpyEx / dnSpy

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

Harmony patch and transpile support #332

Open t1a2l opened 1 week ago

t1a2l commented 1 week 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 1 week 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 days 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.