xileb0
xileb0

Reputation: 461

The breakpoint will not currently be hit - Remote Debugging

I am having a problem with debugging a DLL (C#). The DLL is running on a server and I'd like to debug it with the Remote Debugger Tool from Visual Studio 2010.

I actually can attach to the process, but somehow I always get the following problem at my breakpoint: "The breakpoint will not currently be hit. No symbols have been loaded for this document."

Edit: The .pdb is on the server too.

Upvotes: 13

Views: 14335

Answers (1)

Brendan L
Brendan L

Reputation: 1466

How are you getting the .pdb and .dll files on the remote server? They need to match exactly what is on your local machine. Look at the size of the files and make sure they match between the remote server and your local machine. If they are being built on different machines or with different build configs they will not match. You can copy/paste the bin folder from your local machine to the remote server to make sure the files match exactly. (Back up the server's bin first)

Are you attached to the right process? If you're not sure, try attaching to a few different processes. If your breakpoints work, one of those new processes is the correct one.

Try adding the remote server's bin folder as a symbol file location. This can be done in Options > Tools > Debugging > Symbols. This will tell Visual Studio to check that folder for symbol files.

I wrote this blog post about this after I faced the same issue, it may have a bit more information that will help.

Upvotes: 13

Related Questions