Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"The breakpoint will not currently be hit" keeps showing on a partial view

In a specific partial view, I consistently get a message in the breakpoints I set:

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

Is there any reason for this to happen? What may I have done?

I restarted Visual Studio and I even restarted my computer, but it didn't work.

What do I have to do to debug this page?

Thanks!

Edit

I edit the partial view file with which I am having problems, but the changes do NOT take effect. So, somehow, that bastard compiler is getting the file from somewhere else. Where?!

like image 780
Fabio Milheiro Avatar asked Nov 18 '10 14:11

Fabio Milheiro


2 Answers

I had the same situation after modifying a view that used to debug ok. I reverted my changes and debugging resumed working. I found I had a syntax error on a line. There was no clue it was wrong - there was no red underlining and the project compiled fine.

If you have the problem in your view, I suggest commenting most of the code to a minimal skeleton. If debug works again, uncomment some of your lines back in until you find the problem code. Good luck with that.

like image 152
Big Al Avatar answered Nov 16 '22 01:11

Big Al


There are several possible reasons for that:

  • The version of the source file is not the one you compiled. Try to recompile.
  • The DLL containing the code is not loaded in the program at runtime. Use the program in a way that the DLL will be needed if you have dynamic loading of DLL.
  • You are visualizing a source file which is not in the right directory (another copy of the solution somewhere else on the hard disk). Open the right source file.
  • You didn't compile the program in debug mode. Recompile it in debug mode.
  • You didn't launch the program in debug mode. Launch it in debug mode.
like image 21
Jean-Bernard Jansen Avatar answered Nov 16 '22 03:11

Jean-Bernard Jansen