Why is my module not on the list of modules?

I have a WCF service that I can debug. I set a breakpoint in the code at the point at which I want to debug and receive a message

The breakpoint will not currently be hit. The source code is different from the original version. 

I struggled with this for 3 days and tried everything I found in other posts.

One thing I notice is that if I go to Debug -> Windows -> Modules , the module I want to debug is not in this list. I think this may have something to do with it. Does anyone know what I should do.

Thanks,

Sechin

EDIT:

I tried all these things and more, but for some reason I still have the same problem. Is there any solution for this?

+4
source share
3 answers

To indicate the obvious, this error means that the compiled service does not match the source code, i.e. the source code has changed since the service started. Make sure you restore your decision.

What I'm doing to debug WCF services is to have 2 instances of Visual Studio. One launches the WCF service hosting application (console), and the other launches the client. Make sure you are using the debug version. It should work (and debug) until the client can successfully connect to your service.

You are getting

At the moment, the breakpoint will not be deleted.

when a module with this breakpoint is not loaded (yet). Your service will not be loaded until the client connects.

+1
source

Try closing the visual studio after closing all open files in it. Then go to the bin folder for debugging and delete all the .pdb files. Now open a visual studio and rebuild your project or do a clean and build so that you are in debug mode, not release mode. This problem may occur if your pdb files become locked. If you have a pdb file present for this DLL, then it should pick up this module for debugging.

If this does not work, restart the machine? If you do not try to reboot, as sometimes the process can get into Windows, and restarting will release the lock to overwrite the files.

Quick question. Is the module in question an external module or is it part of your current solution that you are debugging? If this is an internal module, then the above solutions should definitely work, since you will create a new .pdb file for this assembly.

+3
source

Right-click on the project inside the solution explorer and select "Clear." Create a new version of the project and the breakpoint will work again. If this does not work, try deleting everything from the bin and obj folders and create your project again.

+1
source

All Articles