Skip to content

Async/await debugging broken in assemblies with module initializers #6

@jdh28

Description

@jdh28

If you inject a module initializer into an assembly that uses async/await, then (with Visual Studio 2012 at least) local variables in async methods are not displayed correctly in the debugger.

I found this discussion where a similar effect was observed with tools that modified IL: https://social.msdn.microsoft.com/Forums/vstudio/en-US/9c58683c-c3ee-4249-8a70-9a7be599c6eb/vs-rc-2012-debugger-not-recognizing-result-of-result-from-await-call?forum=vsdebug (scroll right down).

Here is a screenshot from my locals window in Visual Studio - see all the variables called CS$x$xxxx.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions