Mr Dog
Mr Dog

Reputation: 396

Debug Design Mode in Visual Studio not breaking

So I am currently unable to open a Form and get the following error:

System.ComponenetModel.Design.ExceptionCollection was thrown.

or:

The designer loader did not provide a root component and has not indicated why

Usually the way to solve this is to open another instance of Visual Studio with the same project, attach the debugger to the other Visual Studio and try to open the form.

However, that does not seem to be working. The debugger does not break when the error is hit, and attempting to 'Break All' at any other point does not show me the source code and just the screen saying:

Your app has entered a break state, but there is no code because all threads were executing external code (typically system or framework code).

Attempting to put break points also results in:

The breakpoint will not currently be hit. No symbols have been loaded for this document

Am I missing a setting? Incorrect Setup?

I have been battling this for half a day and thoroughly search the interwebs with no luck thus far. My designer is also fairly complex and lengthy which means trial and error is an absolute last ditch option.

Upvotes: 2

Views: 1525

Answers (1)

First attempt to resolve:

you may have tried it already. Right click the Solution in solution explorer, click "clean solution", this deletes all the compiled and temporary files associated with a solution.

Do a rebuild of the solution and try to debug again.

Second attept to resolve:

Start debugging, as soon as you've arrived at a breakpoint or used Debug > Break All, use Debug > Windows > Modules. You'll see a list of all the assemblies that are loaded into the process. Locate the one you want to get debug info for. Right-click it and select Symbol Load Information. You'll get a dialog that lists all the directories where it looked for the .pdb file for the assembly. Verify that list against the actual .pdb location. Make sure it doesn't find an old one.

In normal projects, the assembly and its .pdb file should always have been copied by the IDE into the same folder as your .exe. The bin\Debug folder of your project. Make sure you remove one from the GAC if you've been playing with it.

third attept to resolve:

Disable the "Just My Code" option in the Debug/General settings.

there are might be other causes to your problem, i picked them from here. you may try other solution to try resolve your issues. Fixing "The breakpoint will not currently be hit. No symbols have been loaded for this document."

Upvotes: 1

Related Questions