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

Can't set breakpoint on async code #378

Closed
idan-h opened this issue Oct 29, 2024 · 2 comments
Closed

Can't set breakpoint on async code #378

idan-h opened this issue Oct 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@idan-h
Copy link

idan-h commented Oct 29, 2024

dnSpyEx version

v6.5.1

Describe the Bug

.NET 6, I have async code.

When I try to set a breakpoint in the code before I ran it, nothing happens. The breakpoint won't be added.
When I debug and step into the method, then it shows me different code - the state machine code of the async operation.

How do I see this before debugging? why do I see different code that I can't debug?

How To Reproduce

Load some module with async code, go to the async method and try adding breakpoints.

Expected Behavior

Add breakpoints

Actual Behavior

Won't add a breakpoint

Additional Context

f

@idan-h idan-h added the bug Something isn't working label Oct 29, 2024
@ElektroKill
Copy link
Member

Hi,

This is probably occurring because you have this option enabled in dnSpy:
image

Enabling this option results in the debug info for the sync method being generated with regard to the original state machine as opposed to the lifted async code.

@idan-h
Copy link
Author

idan-h commented Oct 29, 2024

Hi,

This is probably occurring because you have this option enabled in dnSpy: image

Enabling this option results in the debug info for the sync method being generated with regard to the original state machine as opposed to the lifted async code.

yea I think this is it haha.
Did this change from the old dnspy? because I remember you had to check this option to actually see the async code

@idan-h idan-h closed this as completed Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants