Ok, I was sure I could add attachments to bug reports sent from tools->nCrunch->submit bug report.. maybe I was wrong or this isn't possible any more with the recent update..
anyway, you can download the logs from here:
https://drive.google.com/file/d/1RTNY43kVTykMj0EU2ag_0OF5v3NZoSFN/view?usp=sharing
Remco NCrunch Developer
#17478
05 Jul 2024 13:54 UTC
Thanks for sharing this. I think the best option may be to force the use of legacy PDBs under NCrunch for this project, while keeping the portable PDBs for your normal build system.
Could you try adding a custom build property for this project with: DebugType=full
I'm hopeful that this will get you up and running again (with the exception of the limited async stepping behaviour). I think that to progress beyond this to fully understanding why this is happening will require a way for me to reproduce this problem in my own environment, which doesn't seem feasible given the effort you've described. The process explorer logs are very insightful but they don't show any write interference with the PDB file outside of windows defender (which I don't think is causing the problem).
Could you try adding a custom build property for this project with: DebugType=full
I'm hopeful that this will get you up and running again (with the exception of the limited async stepping behaviour). I think that to progress beyond this to fully understanding why this is happening will require a way for me to reproduce this problem in my own environment, which doesn't seem feasible given the effort you've described. The process explorer logs are very insightful but they don't show any write interference with the PDB file outside of windows defender (which I don't think is causing the problem).
I forced "DebugType = full" with a custom property for the entire solution.
this solves the wrong source file issue... but still, as you said, I have that weird behavior with awaits... I guess I'll have to cope with it for the moment
Thank You!
this solves the wrong source file issue... but still, as you said, I have that weird behavior with awaits... I guess I'll have to cope with it for the moment
Thank You!
Wanted to say thanks to this thread I was able to solve this same issue on my machine.
I am also on a very large .NET 8 project, with one MSTest project covering almost all of the classes in a monolith .NET 8 app (> 10k tests!).
Same exact behavior - wouldn't hit breakpoints, would switch to debugging mode briefly and then back to normal almost immediately. One additional weird thing I noticed is that failed tests wouldn't get a red X on the line number of the failure.
It would hit breakpoints if I disabled nCrunch instrumentation, but the version of the file came from the nCrunch cache folder, not the project I was debugging, and thus didn't have code coverage or metrics displayed, no hover-to-inspect variables, and wouldn't show the breakpoints (despite hitting them). Disabling RDI also didn't help.
Cleared caches, reinstalled VS, reinstalled nCrunch, tried swapping versions. Wasn't able to repro the issue at all on small test projects, and no problem debugging other smaller projects.
Adding the MSBuild variable to use legacy symbols fixed it. Also seems to fix the lack of a red X on the code coverage column for tests that fail.
Thank you!
I am also on a very large .NET 8 project, with one MSTest project covering almost all of the classes in a monolith .NET 8 app (> 10k tests!).
Same exact behavior - wouldn't hit breakpoints, would switch to debugging mode briefly and then back to normal almost immediately. One additional weird thing I noticed is that failed tests wouldn't get a red X on the line number of the failure.
It would hit breakpoints if I disabled nCrunch instrumentation, but the version of the file came from the nCrunch cache folder, not the project I was debugging, and thus didn't have code coverage or metrics displayed, no hover-to-inspect variables, and wouldn't show the breakpoints (despite hitting them). Disabling RDI also didn't help.
Cleared caches, reinstalled VS, reinstalled nCrunch, tried swapping versions. Wasn't able to repro the issue at all on small test projects, and no problem debugging other smaller projects.
Adding the MSBuild variable to use legacy symbols fixed it. Also seems to fix the lack of a red X on the code coverage column for tests that fail.
Thank you!
Edited 19 Nov 2024 20:54 UTC
Remco NCrunch Developer
#17723
19 Nov 2024 22:48 UTC
I suspect this issue is being caused by the NCrunch's portable PDB writer. We rebuild the portable PDB when we instrument the assembly, and something must be going wrong at this point. To isolate it, I'll need a sample project that can reproduce the problem. Using legacy PDBs is, for the time being, an effective workaround.
Edited 19 Nov 2024 22:49 UTC
Post a reply
Log in to reply.