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

Consider this. You created an app and installed the exe (or the dll) on a remote server. You want to debug the process on that remote server from your development machine.

And when you do, you get:

Enter the curious world of remote debugging.
There are lots of forumposts about this subject but they are just pieces of the puzzle. So let’s grab this problem as a whole and see how I solved it. And hopefully it will work for you too.

First, install the Remote Debugger on the remote machine (which runs the process with the dll you want to debug). The Remote Debugger is located on the Visual Studio (2008 or 2010) DVD. You can configure the remote debugger after installation or later (VS program folder -> VS Tools -> Remote Debugger Configuration Wizard). When you enable the Remote Debugger Service, make sure you enter an account with appropriate rights. So enter the administrator account, just to make sure it works.

Second Install Process Explorer just to make sure your code actually runs. Because one reason you get the dreaded ‘The breakpoint will not currently be hit’ is because the dll is not loaded at all, hence it does not run. So start up Process Explorer and select your exe. Then check the .NET Assemblies tab and check if your dll is actually there.

Third. Make sure the dll in the Debug folder in your VS Soluition is the same as the dll on the remote machine. I can not stress that enough (lol, I always wanted to say that: I can not stress that enough). So delete the contents of your debug folder just to be sure, CLEAN, BUILD, and deploy that same dll on your remote machine.

Fourth At the solution properties, make sure you run in Debug Mode and not in Release Mode! Rightclick you solution, properties -> configuration.

FifthThe most important step is to make sure the remote machine can access the .pdb file. This file contains the symbols that could be loaded. So put it somewhere on a share or where ever, and configure Visual Studio to use that location.
In Visual Studio go to Tools -> Options -> Debugging -> Symbols.

This should be it. Now go to Debug -> Attach To Process and enter the name of the remote machine you want to be debugged. Click Refresh and select the right process. (the one from you app, OK). Click Attach and your breakpoints will be hit! Well maybe after a little while, depends when the dll is called from within the process.

Please let me know if this did not work for you.

2 Replies to “The breakpoint will not currently be hit. No symbols have been loaded for this document.”

  • Hello

    I have deleted the website from my server,
    recompiled my website for Debug,
    copied the dll’s along with the pdb to the server
    activated msvsmon.exe on the server,
    started the app on the remote machine,
    on the local machine, attached to the w3wp.exe process which started the debugger,
    on the remote machine, ran the app,
    no breakppoints were hit and the code shows “The breakpoint will not currently be hit. No symbols have been loaded for this document”.

    Can you tell me what I am doing wrong?

    Thanks for your help.


Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *

%d bloggers liken dit: