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.

87 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Paul Rogero shared this idea  ·   ·  Admin →

    6 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Anonymous commented  · 

        This still seems to be an issue for me. I'm using v2.20.0.4

      • Anonymous commented  · 

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

      • alexquick commented  · 

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

        Thanks for trying to fix this issue, though!

      • Anonymous commented  · 

        Awesome... thanks this is really helpful.
        thanks

      • Anonymous commented  · 

        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  · 

        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