Remote Debugging is not breaking on errors

2020-06-07 03:36发布

问题:

I am fairly new to remote debugging in Visual Studio, and by new I mean I have never done it before. Here are the steps I have taken to try to remotely debug an application on one of the servers in our network:

  • open a website in VS2008 "\\server\website"
  • Start the msvsmon service on "server" with "no authentication" and "allow any user to debug"
  • From VS2008, Attach to the w3wp process on "server" using remote transport

debugging starts and everything seems ok, but when i go to the page with the error, it doesn't break and let me debug. Am I missing something?

回答1:

You need to ensure you have the PDB files loaded correctly.

Visual Studio is going to look in that remote location for the PDB files (which contain the debugger information) and if it doesn't find them it doesn't have the necessary debug symbols to break on.

To add a pathname to the symbol file (.pdb or .dbg) locations list

  1. On the Tools menu, choose Options.
  2. In the Options dialog box, click the Debugging node to open it.
  3. Under Debugging, select the Symbols category.
  4. On the Symbols page, there is a box that says Symbol file (.pdb) locations. Above the box are four icons. Click the folder icon and editable text appears in the Symbol file (.pdb) locations box.
  5. Edit the text to add a new path. Statement completion helps you get the format right.
  6. Make sure Search the above locations only when symbols are loaded manually is not selected, unless you want to load symbols manually when you debug.
  7. If you are using symbols on a remote symbol server, you can improve performance by specifying a local directory that symbols can be copied to. To do this, use the Cache symbols from symbol server to this directory box. Note that if you are debugging a program on a remote computer the cache directory refers to a directory on the remote computer.
  8. Click OK.

http://msdn.microsoft.com/en-us/library/x54fht41.aspx



回答2:

Here's a checklist.