Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Break point not working and modules not loading dll files in VS 2010

I am using VS 2010 professional [64bit - Windows 7] and in my solutions, i have 3 class library project and 1 wcf service projects are there. All these dll's are refereneced in my WPF applications. For the last 1 year, it was working fine and i was able to debug the all the referenced projects. But from yesterday itself, debug is not working all of a sudden.

When I put a break point on a class in the wcf project, it says breakpoints cannot hit as the source file is different from....etc.

When I checked in the Debug --> Windows ---> Modules window, all those projects dlls are not seen there and says no pdb files are available ???

But in the WPF bin\Debug folder, i have all the referenced dlls and their pdb are ther.

What could be the problem ?

Even I am not able to debugg the wpf project as well. For getting break point or debug, each time i have to clean the solution or project then rebuild it again. Then i will be able to debug the WPF project.

In the case of referenced dlls, I removed the dlls and added the new compiled dll again and copied that pdb files to the wpf project exe folder. Still no use !!!!

I have changed the options in the Debug and Options [disabling and enabling the Just my code options etc]. But still it is not working.

This is not only my problem. One of my colleague also have this problem we took the whole latest solution code from TFS. SO I changed the Local code path to a new folder and took the latest code from TFS again. Still the problem exists !!

I am able to run the application. But debug is not working. In the WPF project, all those dlls are referenced properly.

Can anyone help us ???

like image 620
Soonils Avatar asked Nov 28 '12 12:11

Soonils


People also ask

How do I fix breakpoint in Visual Studio?

Hover over the breakpoint symbol, choose the Settings icon, and then select Remove breakpoint once hit in the Breakpoint Settings window.

Why is my breakpoint not working Vscode?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.


Video Answer


1 Answers

I guess I don't have enough points to comment to ask specifics, so this may or may not solve your problem but I'll take a crack at it. Also, there appear to be other questions about this. So I would check those out first to see if they will help.

This question was solved by adding configuration to tell the program which version of the framework to use during debugging. Why doesn't VS2010 debugger stop at my breakpoints?

Why does Visual Studio 2008 skip over my break points?

If those don't help, I'll give it a go.

When I put a break point on a class in the wcf project, it says breakpoints cannot hit as the source file is different from....etc.

This sounds like it could be one of the following issues:

  1. Remote debugging and Visual Studio does not know where to load the symbols from or they are out-of-date
  2. Need to clean and rebuild (which you seem to be doing)
  3. The server you are running your WCF service on is not getting the updated DLLs and PDB files. If it's IIS Express, try killing the process between builds.

Also, make sure you are building in Debug mode and not Release mode. While building Release mode will generate the PDB files if it's set to do so which will allow you to debug an application, the code may be optimized as well which can cause breakpoints to be missed.

like image 140
Justin Kabonick Avatar answered Nov 15 '22 05:11

Justin Kabonick