Search code examples
c#debugginguser-controls

How can I debug 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?

Example image


Solution

  • See Walkthrough: Debugging Custom Windows Forms Controls at Design Time (MSDN).

    Or in a shorter way to do it just once:

    • Start Visual Studio twice with the same solution.
    • The first with an opened designer of your control, the second to attach by using menu ToolsAttach to Process → the other devenv.exe (Visual Studio)