Daily Usage Issues

Sometimes near Empty Autos and Locals Window when debugging a Test with NCrunch

Started by Der-Albert.com on 2,713 views

Hi,

i have this since some months, when I debug a test with NCrunch, then the Autos and Locals Windows shows only this as exploreable (more or less).

Same test while Live Streaming.

with NCrunch https://www.youtube.com/watch?v=Hsl6Ps1LanY&feature=youtu.be&t=6018

and

with ReSharper https://www.youtube.com/watch?v=Hsl6Ps1LanY&feature=youtu.be&t=5945

As you can see, when started with ReSharper everything as expected. When Running with NCrunch the Debugging Session is useless.

I have this on 2019 and 2017, but was not able to reproduce this on purpose. But when it happens it is consitent on the part of the source code. I checked this on another machine
(my main work machine) and it happens also there. So here is the repository https://github.com/DerAlbertLive/FamilyCalendar.

PersonTests.cs as you can see in the Videos.

Best Regards

Albert
Hi Albert,

Thanks for sharing this problem.

This is caused by a known issue in NCrunch's handling of PDB metadata. Recently, something has changed inside the platform that has made this problem more serious.

Unfortunately, it's not so easy to fix. NCrunch's PDB metadata is built on an aging library that was built long before a range of metadata extensions were implemented by MS. Our solution right now is to replace the library entirely with a targeted solution. I'm happy to say this has been progressing well but it will be a few weeks before we're able to publish builds with the new system in place.
Would you be interested in trying the build below to see if this solves the problem for you?

NCrunch_Console_3.28.0.4.msi
NCrunch_Console_3.28.0.4.zip
NCrunch_GridNodeServer_3.28.0.4.msi
NCrunch_GridNodeServer_3.28.0.4.zip
NCrunch_LicenseServer_3.28.0.4.zip
NCrunch_VS2008_3.28.0.4.msi
NCrunch_VS2010_3.28.0.4.msi
NCrunch_VS2010_3.28.0.4.zip
NCrunch_VS2012_3.28.0.4.msi
NCrunch_VS2012_3.28.0.4.zip
NCrunch_VS2013_3.28.0.4.msi
NCrunch_VS2013_3.28.0.4.zip
NCrunch_VS2015_3.28.0.4.msi
NCrunch_VS2015_3.28.0.4.msi.7z
NCrunch_VS2015_3.28.0.4.zip
NCrunch_VS2017_3.28.0.4.msi
NCrunch_VS2017_3.28.0.4.msi.7z
NCrunch_VS2017_3.28.0.4.zip
NCrunch_VS2019_3.28.0.4.msi
NCrunch_VS2019_3.28.0.4.msi.7z
NCrunch_VS2019_3.28.0.4.zip
I quick test with the Solution, it works now. but I have to simple work with NCrunch to see if that happens again. But this week is a short working week for me with much project management. But you can be sure that I will not be quiet about it if it happens again.

Btw. may this have also impact on the problem with async Task Test? I switched to WatchText for impact detection a long time ago, because NCrunch is sometimes not reliable to detect impact with CompareIL (there must an old thread about this here in the forum). But it was not really reproducible.
I don't expect this will change anything around the impact detection, or anything that may be related to async/await.

The problem here was triggered by the following statement:
using Person = FamilyCalendar.Web.Models.Person;

This statement causes a small change in the way namespaces are declared in the PDB. We weren't handling this right, and since VS2015 apparently it can cause the debugger to fail to resolve locals. Others have reported this problem in the past but we could never pin it down because we didn't have the code to do it. Your repo changed that :) We've noticed the tooling seems to be doing type aliasing more often now so it's likely this is the reason many people are experiencing the issue more in the last few months.

While rewriting our instrumentation system I've discovered a few other areas where our old handling of PDBs hasn't been right, but it hasn't been practical to fix these issues because that whole area of code is going in the bin soon. I look forward to the day when we aren't plagued by these sorts of problems anymore.

Post a reply

Log in to reply.