How to debug a Winform Usercontrol in .net core 3.1 or 5?

davi1td

Member
Joined
May 28, 2021
Messages
6
Programming Experience
5-10
I attached 2 pics showing the problem, In .net 4.8 framework, which works, when your run the control and the debugging instance starts you'll notice I can see all loaded modules, except of course the usercontrol until the solution
is loaded in the debugging instance.
But in .net core 3.1 or 5 things are completely different, no symbols at all are loaded and therefore can't hit any break-point in the Usercontrol.
What am I missing? Is there something that needs to be enabled when using .net core for this to work?
Thanks
-TD
 

Attachments

  • DebuggerControl.Net.4.8.Working.jpg
    DebuggerControl.Net.4.8.Working.jpg
    312.2 KB · Views: 55
  • DebuggerControl.Net.5.Not.Working.jpg
    DebuggerControl.Net.5.Not.Working.jpg
    317.3 KB · Views: 57
With the .NET 5 project loaded, double check your Debugger options and settings. Is it still set to load modules automatically?
 
Tools.Options.Debugging.Symbols has a radio button regarding loading modules.
 

Attachments

  • DebugControlSolution4.8.working.zip
    31.1 KB · Views: 21
  • DebugControlSolution.Net5.0.zip
    41.5 KB · Views: 20
It's broken for me too.

Considering that it was just a last minute decision made by Microsoft to continue support WinForms for .NET Core, I'm not surprised that some things are not too fleshed out on the WinForms side of things.
 
It would appear you are in direct agreement with the remarks I recently posted about DNC on the DIC forums, and how fecking useless it is due to the abundance of bugs, and not just winforms.

Told you it was rushed. I've 8 projects on the backburner until the Microsoft community fixes and reports all the bugs for Microsoft dev team. Same shit, different Microsoft product. Some things never change!
 
"Load all modules, unless excluded" is selected yes 4.8 works same IDE, I've attached both , this is all per Walkthrough: Debug Custom Windows Forms Controls at Design Time
I attached both projects
Can't thank you all enough, I just needed validation. What I didn't mention is I posted to Msoft, who then made me feel like an idiot after waiting one month for a response: (Thank you for taking the time to log this issue! We are unable to reproduce this issue , could you please provide the reproduce steps and a sample solution that has this problem so that we can conduct further research? We look forward to hearing from you!)
 
I'm not sure how this is tied to validation. But If you found a fix, then who's complaining.

Don't knock yourself even if you did get something wrong... Microsoft's DNC documentation is in need of much updating and many a bug fix too.
 
I'm not sure how this is tied to validation. But If you found a fix, then who's complaining.

Don't knock yourself even if you did get something wrong... Microsoft's DNC documentation is in need of much updating and many a bug fix too.
Well, I was referring to my other comment originally from Msoft, saying after 1 month, hey works fine here, can you send us more info. Like ya right they really actually looked into it ... Thanks again .
 
Well, I was referring to my other comment originally from Msoft, saying after 1 month, hey works fine here, can you send us more info. Like ya right they really actually looked into it ... Thanks again .
And there is no solution, or confirmation from them to date ...
 
Apologies. This hot weather tends to burn out the few braincells I have left these days. Sadly, all you can do is wait for a fix unless you can find one yourself. Skydiver is great at finding bug fixes and troubleshooting his way through unexpected problems and such. I'm not saying he will, but if you ask him nicely and are willing to wait until he has time, he may dig into the issue to see if their is a work around for you. He's helped me out in the past like this. :cool:

I misunderstood your post in brackets. I feel your pain. Imagine making 8 almost identical websites, only to realise you've been screwed by a number of horrible code bugs all of which are DNC related... Because It happened to me. The argument I was making above, is; Microsoft like to pre-release things when they are not ready, and then they allow their customers/developers to become their error loggers/code monkeys. That's why Microsoft have in place such a BS procedural request process ie. asking for more details to replicate the issue you are experiencing, rather than them fully testing their products before release which are the root cause of your issues. You become their logger, and maybe even their code monkey too.

The only way they will ever stop doing this; is for people to stop feeding them reports.

Frankly, I blame Bjarne Stroustrup, as he was the one insisting Microsoft follow their current path within the Framework back when he was writing his latest C++ version which has led to some of these issues we can see today. It's my opinion that Microsoft should have disbanded .net Frameworks long long ago. The only reason it's still alive today is because people are to stupid to use Linux and learn its ever-growing potential. And mainly because of the customer base Microsoft built up, which they didn't want to leave behind. Understandable I guess. But about 13 years ago they had a chance to improve the frameworks drastically, but their changes would have broken a lot of existing applications had they preceeded in that direction. Bjarne has admitted this himself, and it was a mistake in my opinion, and maybe his too.

I don't think .net frameworks has much of a future at its going rate. Mostly because many of the changes they have made is already breaking their own modern-day code. Having spent the last 20 years at this, It gets tiring being a code monkey running around reporting on forums and fixing their github mess. They should have worked longer on .net frameworks before going near DNC. Simple solution for me is to not use any of their products or frameworks. Evidently, its also easy to understand why they went opensource with .net.

Over the years participating on a number of forums like this one, it was easy to direct someone to the documentation and say read that, and you can't go wrong. Now I am finding myself testing documentation before I go telling people to go read it. Yes, the Microsoft documentation is not only out-dated in places, it also has misleading references, and resides today a lot of broken code examples. Something I hope they brush up on for their sake.

With programming languages like Kotlin coming along (which I also write along-side Python and others). Programming is moving in the right direction (away from Microsoft), but I just wish Kotlin wasn't based on Java class libraries. I've also made a dash for dabbling with Google API's, and I am ever-so leaning back on low-level programming once again. But one thing you will find as a developer, is that most of these frameworks are problamatic in one way or another and most are a waste of time, and like all frameworks, they die out... Php is a great example of this, with so many frameworks, and each have their own pros and cons. And most of them are dead today as php progresses. Admittedly .net is one of the longest living frameworks today.

All beit, we are not all bound to .net, we can choose to use OS X, Linux and others. I welcome the day a replacement comes along for all of them to merge. Wishful thinking, something we can only dream of. :)

Good luck with your project.
 
Back
Top Bottom