Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Breakpoints not working properly
carlosirna
#21 Posted : Friday, July 5, 2024 1:21:24 PM(UTC)
Rank: Member

Groups: Registered
Joined: 11/19/2018(UTC)
Posts: 15
Location: Italy

Thanks: 1 times
Was thanked: 2 time(s) in 1 post(s)
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...3NZoSFN/view?usp=sharing
Remco
#22 Posted : Friday, July 5, 2024 1:54:04 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,135

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
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).
2 users thanked Remco for this useful post.
carlosirna on 7/7/2024(UTC), scott_wi on 11/19/2024(UTC)
carlosirna
#23 Posted : Sunday, July 7, 2024 10:19:01 AM(UTC)
Rank: Member

Groups: Registered
Joined: 11/19/2018(UTC)
Posts: 15
Location: Italy

Thanks: 1 times
Was thanked: 2 time(s) in 1 post(s)
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!
scott_wi
#24 Posted : Tuesday, November 19, 2024 8:45:43 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/17/2019(UTC)
Posts: 3
Location: United States of America

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
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!
1 user thanked scott_wi for this useful post.
Remco on 11/19/2024(UTC)
Remco
#25 Posted : Tuesday, November 19, 2024 10:48:47 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,135

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
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.
Users browsing this topic
Guest
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.046 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download