I suggest you ...

Provide Debugging Support for Async/Await Methods

Posted in response to: http://forum.ncrunch.net/yaf_postsm5589_does-not-exist-in-the-current-context.aspx#post5589

It seems there are technical issues that limit the debugging experience of async/await methods when using NCrunch. Essentially the auto's, local's, and watch windows in visual studio cease to function properly when debugging async/await code when using NCrunch. Ideally, such technical issues could be overcome, but if that is not possible, the following would suffice:

Add a debugging mode in NCrunch that does not add NCrunch instrumentation to the code. This would allow new debugging options such as 'Debug covering tests without instrumentation' and 'Break into first covering test without instrumentation'. This would allow the option of a proper debugging experience when the need to debug async/await methods arises.

Currently I workaround this issue by utilizing another unit test runner such as Resharper's or Visual Studio's unit test runner when I need to debug async/await code.

31 votes
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)

We’ll send you updates on this idea

Paul Rogero shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

6 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Anonymous commented  ·   ·  Flag as inappropriate

    Still an issue in 2.10 builds, have to use Resharper / standard Visual Studio's runners.

  • alexquick commented  ·   ·  Flag as inappropriate

    I can confirm that it has not fixed the issue with iterator blocks.

    Thanks for trying to fix this issue, though!

  • Anonymous commented  ·   ·  Flag as inappropriate

    You can make your test methods non async and add .Wait() or .Result() to every await-able method call.
    its annoying but it helps some.

  • Jeff Pinkham commented  ·   ·  Flag as inappropriate

    Yep it's a total pain. I end up having to use Resharper's test runner.. and if I wanted to do that I wouldn't have bought ncrunch..

    ALL of my code is async awaited as I mainly build APIs for mobile and web clients. Rendering Ncrunch useless in debugging scenarios.

Feedback and Knowledge Base