You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
It looks like CC rewriter produces incorrect table of yield/resume offsets for the MoveNext() method of the async state machine. As a result it's not possible to step through async methods with the VS debugger.
First, if you don't define any conditions in the project with CodeContracts enabled, the rewriter still modifies the IL of the assembly slightly and instruction offsets change. However debug info is not updated accordingly.
Second, if you add some conditions to the project, then debug info is updated but still contains incorrect offsets.
To reproduce, you can open the attached solution in the VS and try to step through Method1(). The debugger loses track of the method execution after the first await. If CodeContracts are disabled, then stepping through the method works correctly again. AsyncDebugging.zip
The text was updated successfully, but these errors were encountered:
Note that this is fixed if you create your own build of CodeContracts. It was fixed by using a new version of Cecil if I recall (old version was not async aware). It is not fixed in the public release.
It looks like CC rewriter produces incorrect table of yield/resume offsets for the MoveNext() method of the async state machine. As a result it's not possible to step through async methods with the VS debugger.
First, if you don't define any conditions in the project with CodeContracts enabled, the rewriter still modifies the IL of the assembly slightly and instruction offsets change. However debug info is not updated accordingly.
Second, if you add some conditions to the project, then debug info is updated but still contains incorrect offsets.
To reproduce, you can open the attached solution in the VS and try to step through Method1(). The debugger loses track of the method execution after the first await. If CodeContracts are disabled, then stepping through the method works correctly again.
AsyncDebugging.zip
The text was updated successfully, but these errors were encountered: