I created a custom ListView with a UserControl. When the mouse enters the ColumnHeader it should change color at design time.
It works, but I need to debug code. How can I debug code at design time?
I created a custom ListView with a UserControl. When the mouse enters the ColumnHeader it should change color at design time.
It works, but I need to debug code. How can I debug code at design time?
See Walkthrough: Debugging Custom Windows Forms Controls at Design Time (MSDN).
Or in a shorter way to do it just once:
%ProgramFiles(x86)%\Microsoft Visual Studio\2017\<edition>\Common7\IDE
–
Outofdoors Kelon's answer is correct for Windows Forms, but not for XAML.
In Visual Studio 2012 and later, the XAML designer runs in its own process outside Visual Studio (devenv.exe). To debug XAML controls at design time you need to attach the second instance of Visual Studio to 'XDesProc.exe' (Xaml Designer Process).
Detailed instructions:
Menu Tools → Attach to Process, and attach to the XDesProc process you noted above
If you are debugging an exception, menu Debug → Windows → Exception Settings, Common Language Runtime Exceptions → checked
Go back to the first instance and re-open the XAML file.
To debug again you can save time by doing menu Debug → Reattach to process, which attaches to the same XDesProc.exe as before.
© 2022 - 2024 — McMap. All rights reserved.