Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include comments in generated IL listings #361

Open
chillitom opened this issue May 6, 2024 · 1 comment
Open

Include comments in generated IL listings #361

chillitom opened this issue May 6, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@chillitom
Copy link

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 chillitom added the enhancement New feature or request label May 6, 2024
@waf
Copy link
Owner

waf commented Jun 8, 2024

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 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants