CSharpRepl icon indicating copy to clipboard operation
CSharpRepl copied to clipboard

Include comments in generated IL listings

Open chillitom opened this issue 1 year ago • 1 comments

Feature Description

With the F9/Ctrl-F9 IL function, it would be great if comments would persist through to the generated IL, then we could do something like this...

image

In fact every statement could be wrapped in a // START STATEMENT and // END STATEMENT automatically to help find the part of interest and ignore the wrapping async state machine code.

chillitom avatar May 06 '24 06:05 chillitom

Unfortunately, comments are stripped during the compilation process, so I don't think preserving comments is possible.

I like the suggestion to use comments to show the corresponding C#. We actually use the ILSpy library internally in CSharpRepl, so it'd depend on finding the right disassembler setting. The code in CSharpRepl involved with this is in Disassembler.cs -- Pull Requests welcome 😄

waf avatar Jun 08 '24 03:06 waf