Author Topic: Debugging>Breakpoint>Locals empty  (Read 428 times)

0 Members and 1 Guest are viewing this topic.

Jeff_M

  • King Gator
  • Posts: 4092
  • C3D user & customizer
Debugging>Breakpoint>Locals empty
« on: March 10, 2024, 02:48:17 PM »
I have a project that recently started not behaving when debugging. The locals window never populates with any variables and hovering over a variable no longer display the value. Every other project I open works as expected, and this one used to work just fine.

Google returns a number of others having this issue, but all those seem to not be project specific. Regardless, I have tried every "solution" I found to no avail. This project is actually pretty small, the debug build is just a 45kb dll.

Any ideas as to what I may have done to this project to cause this?

Edited to add that I am using VS 2022 Pro. Also tested in VS 2022 Community.
« Last Edit: March 10, 2024, 03:03:47 PM by Jeff_M »

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2129
  • class keyThumper<T>:ILazy<T>
Re: Debugging>Breakpoint>Locals empty
« Reply #1 on: March 10, 2024, 03:50:38 PM »
Jeff,
Can't recall ever seeing that issue, in Community.

Regards,
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

Jeff_M

  • King Gator
  • Posts: 4092
  • C3D user & customizer
Re: Debugging>Breakpoint>Locals empty
« Reply #2 on: March 10, 2024, 05:28:27 PM »
Thanks, Kerry.

I finally gave up and created a new project on a different drive, copying the .cs files and folders from the original. A quick test and it was working as expected. I then copied all of the folders and files from the new to the original except the .sln & .csproj.user files and deleted the .vs file. It's back to working fine.

Prior to copying the files I used WinMerge to compare the 2 .csproj files. There were some things in the original project that I do not recall having added and are not in the new one so I deleted those. After testing the issue remained.

So even though I am back up and working, I still have no idea what caused the issue. I'm just happy it was with this small project instead of my much larger ones.
« Last Edit: March 10, 2024, 05:32:04 PM by Jeff_M »

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2129
  • class keyThumper<T>:ILazy<T>
Re: Debugging>Breakpoint>Locals empty
« Reply #3 on: March 10, 2024, 07:13:27 PM »

Hi Jeff,
I was going to suggest creating new & copying code , but I knew that was a last resort that you would decide on yourself.

Great to hear there were happy endings.
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8690
  • AKA Daniel
Re: Debugging>Breakpoint>Locals empty
« Reply #4 on: March 10, 2024, 08:04:56 PM »
the only thing I can think of is a missing or incorrectly named .pdb file

CADbloke

  • Bull Frog
  • Posts: 342
  • Crash Test Dummy
Re: Debugging>Breakpoint>Locals empty
« Reply #5 on: March 13, 2024, 10:02:05 PM »
Did you try restarting VS? I have a had a bug on the 2 machines I use where undo/redo stops working if I use the WPF designer but not consistently. I also recall losing debug hover values. VS is very modular these days which seems to mean only bits of it crash instead of the whole IDE. Still, when it works it works.

Jeff_M

  • King Gator
  • Posts: 4092
  • C3D user & customizer
Re: Debugging>Breakpoint>Locals empty
« Reply #6 on: March 14, 2024, 05:38:54 PM »
@CADbloke, yes, restarted VS multiple times, rebooted laptop all with the same end result of not helping the issue. Thanks for the suggestion!

retsameht

  • Mosquito
  • Posts: 14
Re: Debugging>Breakpoint>Locals empty
« Reply #7 on: March 14, 2024, 08:07:19 PM »
A longshot, but try adding this to your  .csproj file:

Code: [Select]

<DebugType>portable</DebugType>


Atook

  • Swamp Rat
  • Posts: 1029
  • AKA Tim
Re: Debugging>Breakpoint>Locals empty
« Reply #8 on: March 16, 2024, 07:00:35 PM »
the only thing I can think of is a missing or incorrectly named .pdb file

Yup, try deleting the pdb file in your debug folder let VS compile a new one.