winform debug 模式调试
To debug design-time of your windows forms project:
Right click on your project in solution explorer and open Properties.
In the property page select the Debug tab.
In the Start Action section, select Start external programand then click on button to browse for the Visual Studio executable file devenv.exe which is located in a path like "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe"
Save project and then run using F5. A new instance of visual studio will be opened.
Open the project using new instance. Which enables you to debug the previous instance of visual studio containing your project.
Put breakpoints in the files which you want to debug in instance.
如果一个组件被包含在Panel中, 那么该组件的DesignMode是False, 坑。。。