I have some issues with my Windows Forms UserControl and am unable to place it in a form. I'm trying to find the problem using design time debugging with devenv.exe but whatever I try, breakpoints are ignored. At first I had the "breakpoint will not be hit, no symbols for this document" warning but I fixed it and now there is no warning.
I know this has been answered may times, but none of these have worked for me and all out of options
- Enabling DEBUG constant
- Setting debug info to full
- Disabling Just my code
- Making sure the breakpoint is in the right place to be hit
- Making sure I use the debug option before launching
- Making sure I'm attached to the right process (there is only one available)
- Setting the project as startup
- Running VS as an administrator
- Disabling Step over properties and operators
Try these:
Make sure that you used Debug configuration to debug your project.
1) reset vs settings under Tools-->Import and Export Settings--> reset vs settings
2) close Vs, delete
.vs
hidden folder under the solution folder,bin
andobj
folder.Also, Windows Forms UserControl project is a class library project, and it cannot set up to debug directly. You should create a console or windows form exe project and then reference the Windows Forms UserControl project, after that, initialize the class with
class_name xxx=new class_name();
, set a breakpoint on that. At last, set the new exe project as a startup project and then test it.3) when you are debugging, please enter Debug-->Windows-->Modules and check if your
<user_control_project_name>.pdb
file is loaded, if not, you could right-click on it to Load Symbols.