Reputation: 701
I am using Visual Studio 2005.I am running my code in Debug mode only.But my break point is not being hit.
I followed :
But i am unable to figure out the problem.
My Question is:
Suggestion is needed.
Upvotes: 1
Views: 6366
Reputation: 42516
It sounds like the problem you are having may be due to the source code and the .pdb files being out of sync with each other.
Try these steps:
Sometimes the solution .suo file can become corrupt (doesn't cause Visual Studio to indicate any errors, but usually leads to strange behavior). Nine out of ten times, deleting the .suo file clears any strange behavior in Visual Studio.
The trick about deleting the "obj" folders forces Visual Studio to truely do a clean build the next time it compiles. Doing a "clean" build in Visual Studio only deletes the compiled binary results, it doesn't remove any intermediate object files that may have been created that Visual Studio might be linking against. By manually deleting the "obj" folders, you delete those cached object files and force a true rebuild.
Upvotes: 7
Reputation: 10776
What kind of project is it (website, console app, ...) Are you running the project directly from visual studio, or attaching to it afterwards?
Usually when this happens to me, its because the assemblies that are being used to run the process I want to debug do not match the currently built assemblies from visual studio.
You mention IE8, so if this is a website, you should try to attach visual studio to the w3wp.exe process. Otherwise the breakpoint won't have any effect. Alternatively, run the website using visual studio.
Upvotes: 1
Reputation: 30418
If you hover over the breakpoint in Visual Studio, does it indicate an error? Common problems are that the code hasn't been built, or the DLL that contains the code isn't loaded into the debugged process.
Upvotes: 0