ILSpy icon indicating copy to clipboard operation
ILSpy copied to clipboard

Add Bookmarks pad

Open siegfriedpammer opened this issue 5 years ago • 5 comments

Add a bookmarks pad that allows keeping a list of items from the assembly list treeview for quick navigation.

siegfriedpammer avatar Dec 02 '19 08:12 siegfriedpammer

Please consider using shortcuts e.g as in VS - F2 and CTRL+F2 devs used to that combo, so will give it a like :)

greenozon avatar Dec 02 '19 18:12 greenozon

I hope to add bookmark feature. thanks a lot.

wzengguang avatar May 02 '20 05:05 wzengguang

Bookmarks for individual lines of code will be very useful too

niello avatar Mar 06 '21 11:03 niello

Hello @siegfriedpammer , I can take up this one, just wanted to make sure no one else is working on it right?

RTX2080S avatar Aug 04 '23 08:08 RTX2080S

We didn't get around to designing the feature during our developer days. Some notes though:

  • What to bookmark: line in decompiled source? Tree nodes?
  • What is the identity of the assembly and how do you remember the bookmark (most likely IL to line number in C#) Note: we support not only bog-standard .dll but also eg. NuGet or zipped.
  • What happens when the language version changes? Some constructs decompile differently in different language versions and thus the bookmark might shift if C#-line-based.
  • What happens to a bookmark if you switch from C# to say IL? Or should we support bookmarks only in C#?
  • What happens to a bookmark if you rebuild your project and the line the bookmark was (IL instruction) is no longer there?
  • What happens if the assembly is removed from the assembly tree? (most likely: auto-remove all bookmarks, or: have a node with bookmarks for unloaded assemblies so you could get them back if the assembly gets re-added)
  • Nice to have "Copy/paste bookmark from assembly x to y" (best effort) - eg you are comparing two assemblies with different versions.
  • In the same vein: Export/Import (entire list, bookmarks for assembly) - so one can share bookmarks with others.

In general:

  • Do not store in ilspy.xml. Same location, but separate file, eg bookmarks.json.
  • Looking at dnSpy visually is ok, source code a big no-no because it is GPL (doesn't mix at all with our MIT license, so best to not know anything about it)

christophwille avatar Aug 07 '23 05:08 christophwille