dnSpy.Extension.HoLLy icon indicating copy to clipboard operation
dnSpy.Extension.HoLLy copied to clipboard

Enhanced UI for quick editing data types of parameters and locals

Open Washi1337 opened this issue 4 years ago • 0 comments

Summary

dnSpy is nice for simple quick patches in CIL, but currently lacks good UX for editing data types of locals and parameters inside a method. I would love to see something similar to tools like IDA/Ghidra, where you can quickly change the type of such a symbol without going deep into the edit dialogs. Here are a couple of proposals that you can consider including in your extension :)

Relevant locations

Current method editing dialog is pretty inconvenient when it comes to changing the type of a single parameter. This is especially the case for methods with multiple parameters. There is also no edit button for a single parameter type:

01

Maybe add it here? Bonus points if it has a hotkey.

02

In a similar fashion, it would be nice if we could retype local variables using a hotkey or context menu item (or both :P)

Proposal for a re-type dialog box

Finding a new type to assign to the symbol is very clumsy at the moment in dnSpy. Would be pretty nice if you could just open a small dialog box and type in the C# type reference (with support for compound types like array or pointer specifiers). We could maybe use Roslyn that dnSpy is already referencing for the initial parsing. In case of ambiguity, there could be a dropdown with the choices, similar to how Ghidra does this

03

Washi1337 avatar Feb 21 '21 20:02 Washi1337