Page 2 of 2

Re: Weird debugger behaviour on statics

Posted: Tue Aug 29, 2023 8:51 am
by ColinP
Centripidity wrote: Tue Aug 29, 2023 4:08 am
When you run outside the debugger have you checked the VM log file to see if an exception is thrown?
Yes, I've checked the ModuleDesignerTestClient log file and there aren't any error messages.

I'm pretty sure it's a bug (possibly two bugs) in the debugger. But it's not straightforward to reproduce or even analyse. I've spent a couple of days on this now so have decided to just shrug my shoulders and move on.

The code runs fine outside the bugger but obviously I want to be able to debug other code so it's a problem I've had to work around. It's not the first time I've had to workaround something.

Hopefully this thread has still been useful in giving other devs a heads-up about potential problems when debugging initialization code especially when statics are involved.

Re: Weird debugger behaviour on statics

Posted: Wed Aug 30, 2023 4:54 am
by UrbanCyborg
I know you don't like to complain to CA, but this sounds like one you really should report formally.

BTW, for what it's worth, for anyone who uses Visual Studio for anything, I tracked down why my copy went away down south to the land 'ob cotton when I installed the latest v17 update. Turns out it needs a version of .NET that is a preview version that you have to request. At least, installing that fixed things. I deduced that by having a look at my Windows 10 logs, where there were a slew of errors, most of which seemed to originate with .NET errors. I know that's not the only thing that could make a dev installation go belly up, but it's easier to fix that than to do any of the other fixes I tried, including uninstalling and reinstalling the beast.

Reid