Skip to content

davi2td/DebugControlSolution.Net

Repository files navigation

Disregard the Info Below, turns out undocumented for .Net Core + you have to:

dotnet/winforms#4894 The issue is that your control designer runs a different process than devenv.exe because it needs to run on .NET Core, while Visual Studio runs on .NET Framework. To debug, do exactly as you did below. However, before adding your control from the designer, attach to the "DesignToolsServer.exe" process from the instance of Visual Studio that is doing the debugging.


Per this link for debugging a custom Winforms Control for .net Framework 4.8: Walkthrough: Debug Custom Windows Forms Controls at Design Time.

It does not work for .net core 3.x through .net 5. No Modules are loaded and therefore can't debug on any line, no source loaded.

Working Example 4.8 Framework: In the below image, if you were to load Form1 the break line would indeed be hit, notice how before that happens though, all modules are loaded as expected execpt for the DebugControl, which isn't loaded yet.

Non working Example .net core -> 5: Here everything is the same:same IDE, Symbols set to "Load all modules, unless excluded" just as before, except its targeted for .net 5.

As you may know, debugging a Standard Library is quite different than for a Winform UserControl. Per the above article from Microsoft you debug a UserControl at Design time by setting debug properties to launch an executable and give the path to Devenv.exe.

I'm unable to accomplish this in either vs2019 16.10.0 or vs2019 16.11.0.preview 1.0.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages