Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Visual Studio Source Server with Async/Await method debugging



  • I have an odd one that I have been working on for two days.

    We have a TeamCity/ProGet setup for our internal nuget packages. It got to the point where we needed to debug the nuget packages so I went ahead and enabled source server support. Everything wired up nice and easy and I moved on.

    Later in the day I attempted to step into an awaitable method in a nuget package and it stepped right over it (no error or printed output stating the source could not be found).

    During my troubleshooting I created a sync wrapper for the method I was trying to step into, republished the nuget package and attempted to step into it which worked without issue.

    To rule out the more complex library I created a new nuget package with two methods:

    public async Task<bool> MyTestAsync()
    {
        return await Task.FromResult(true);
    }
    
    public bool MyTest()
    {
        return MyTestAsync().Result;
    }
    

    I can step into the sync method everytime without issue but VS 2015 steps over the async method each and every time.

    To rule out my box I went to a fresh image and reproduced the test which yielded the same results.

    Is there a limitation to source/symbol server debugging that I cannot see to find in a google search? Has anyone else gotten this to work?

    Product: ProGet
    Version: 3.8.6



  • There's absolutely nothing on ProGet's end that would cause symbols/source to sometimes work, and sometimes not in this manner. Async implementation in C# is very complicated and brand new, whereas source/symbols, OTOH are a 20+ year-old technology, and extremely fragile.

    So, this is just a bug in VS2015, where it's not loading a remote symbol. You can verify this using something like Fiddler or Wireshark, and then see that it's not even attempting to load symbols with the async debug.

    Please do send this to Microsoft, so they can fix it in a future update.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation