none
Remote Debug VS2005 Debug Symbols Not loaded

    Question

  • I am receiving the following message while attempting to remote debug an application:

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

    I have successfully installed the remote debugging components on the server. I am able to attach to the remote process fine.  My program is just waiting for a request in order to start executing, but it will not be able to do such since the debug symbols are not loaded on the remote server. 

    On my dev machine, I've located the debug symbols for my application in the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\.... folder, but this still does not fix the problem.

    Suggestions, please.  Am I pulling the right debug symbol?  How do I compile my app to output all the necessary runtime files including the correct pdb?

     

     

     

    Thursday, October 05, 2006 8:44 PM

Answers

  •  

    For those with the same issue, I got it sorted.  The anonymous route does not work for Managed code..just a restriction by ms.  You have to use windows auth, ie., the default transport.  I was working across domains so had to create local users at client and server with the same account name and password.  I then had to log into both client and server with that user, start the remote debugger on the server and start debugging on the client.  Additionally, I found I also had to add the local user to the administrators group on the server.  I can now successfully remotely debug across domains.

     

    Craig

    Tuesday, June 05, 2007 8:20 AM

All replies

  • Did you add that path in VS preferences (Tools->Options->Debugging->Symbols) ?
    Friday, October 06, 2006 10:26 AM
  • That path is where the code is currently being compiled and it already contains the pdb files...when i move these files to the remote server, I still get the "debug symbols not loaded" error message.  My thoughts are that the pdb in this location was incomplete.

    So....I downloaded the studio add-in to allow "add web deployment project".  Now VS2005 outputs all my assemblies and pdb's just like in 2003, so I am confident I have the correct symbols.  But, when I move them to the remote server - I still get the "debug symbols not loaded"!!!

    The problem is not with the debug symbols.  It must be some other setting.  Any ideas?  I can debug the same code locally no problem - what am I missing on the remote server? 

     Note: when i am setting up the remote debugger, I am using No Authentican (native only) and allowing any user to connect.  From my localhost, I can attach fine, but can't step into the code since the debugging symbols are not loaded.

     

    Friday, October 06, 2006 6:20 PM
  • Is this for a web service?  Are you sure that the PDB files are also being copied to the web server when you deploy your site?  Make sure your web deployment project points to the windows path of the web site's deployment location -- something like \\server\c$\inetpub\wwwroot\mysite.  Then rebuild your web deployment project.

    Additionally, you may need to actually browse to the site first to make the DLL (and it's corresponding PDB) to load.

    HTH,
    Michael
    Monday, October 09, 2006 6:12 AM
  • Yes, this is for a webservice. 

    I followed your advice and using web deployment project published the site to remote site directly using the compilation>output folder property.  I double checked that all of the assemblies updated on the remote server along with the pdb files.  Everything looks good.  I also did browse to the site first as you recommended.

    BUT...I am still getting the same error, "could not load symbols...."  I wish these errors were more specific.

    Monday, October 09, 2006 3:40 PM
  • I have another suggestion -- it may not be a solution, but worth having a look if you're out of ideas.

    Open the Modules window (it's in the Debug menu somewhere).  Look for your DLL in that list.  It should say that the symbols cannot be loaded.  Right click on it -- you should be able to get some info on where it's looking for the PDB files.  This may give you a hint on what's going wrong.
    Tuesday, October 10, 2006 2:37 PM
  • Very interesting suggestion and it may shed some light on the issue.  On the remote server (in the modules window), I do not see my DLL in the list???  When I debug the app locally, however, I do see my dll in the list.  Why is the dll not showing in the list?  All my code/pdb's were deployed using web deployment project correctly to the remote server.

    Any other suggestions? Please!

    Wednesday, October 11, 2006 2:40 AM
  • Is there a chance you're not attaching to the right process?  When you're browsing to your web application, you should see the DLL being loaded, if not before that.

    If you have more than one ASP.NET process running on your server, you may want to try this: on the server side, go to Start/Run/cmd, then execute a script called c:\windows\system32\iisapp.vbs (Read the prompts if any, answer yes/OK to proceed).  It will print out the list of ASP.NET processes, their names, and, most importantly, the PIDs.  You want the one that's called something like DefaultAppPool.

    Related to this point -- make sure the ASP.NET process you want is actually running before you try to attach.  If it's not running, it won't appear in the list of processes to attach to.  You can ensure the process is started by browsing to the Web app and force the DLL to be loaded.

    Hope that helps.
    Michael
    Wednesday, October 11, 2006 3:19 AM
  • iisapp.vbs shows the following:

    W3WP.exe PID: 2540   AppPoolId: DefaultAppPool

    I am able to find this PID in my remote attach to list and when I attach to it, I still recieve the error that it cannot load debug files.

    Following is information on this PID from the modules list:

     w3wp.exe C:\WINDOWS\system32\inetsrv\w3wp.exe N/A N/A No symbols loaded.  1 6.0.3790.1830 (srv03_sp1_rtm.050324-1447) 3/24/2005 8:31 PM 01000000-01005000 [2540] w3wp.exe: Native 

    note that no symbols are loaded.  I am unclear of what options I should take to load these symbols properly.  Is this c:\windows\... path referencing my client or the server?

    I do see my dll in this module list, as follows:

     ApplicationMessagingWS.DLL C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\applicationmessagingws\d12b383c\81865b9f\assembly\dl3\eefe4bf7\b8b19270_b6ebc601\ApplicationMessagingWS.DLL N/A N/A No native symbols in symbol file.  65 1.00.2473.18696 10/9/2006 6:23 AM 01E30000-01E38000* [2540] w3wp.exe: Native 

    There is a red circled ! mark next to it and specifies that no native symbols in symbol file.  It also appears to be referencing my local machine as denoted by the c:\windows\ path.  Once again, I would think this would be pointing to the server, not my client.

    when i right click on this and select symbol load information isee this:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\applicationmessagingws\d12b383c\81865b9f\assembly\dl3\eefe4bf7\b8b19270_b6ebc601\ApplicationMessagingWS.pdb: Cannot find or open the PDB file.
    \\vpmwshqs009\d$\ApplicationMessagingWS\bin\ApplicationMessagingWS.pdb: Symbols loaded.
    No native symbols in symbol file.

    Note: the vpmwshqs009 is the remote server name!

     

    Wednesday, October 11, 2006 4:25 AM
  • Try this: when you attach to the process, in the `Attach to Process' window select `Managed code' in the `Attached to:' area.
    Wednesday, October 11, 2006 4:55 AM
  • We may be zeroing in on the root problem.

    The only way I've been able to view the remote processes is by going to the server and configuring the remote debug monitor with no authentication and allowing any user to debug. Then from the client, in the attach to process window, I select transport: remote and qualifier: [remotemachine:port].  By default the attach to is: native code.  This lists the available processes on the remote CPU.

    When I chose transport: default, qualifier: [remotemachine:port], and attach to: managed,native code and click refresh i receive the following error:

    "unable to connect to the microsoft visual studio remote debug monitor named ...... Windows authentication is disabled in the remote debuggin montitor (MSVSMON). To connect, choose 1 of the following:

    1. enable windows auth in MSVSMON

    2. reconfigure your project to disable windows auth.

    3. use the remote (native with no auth) transport in the 'attach to process' dialog."

    As I noted, when I do #3 i can see the list of remote PID's.

    Perhaps I go the route of setting up the remote debug monitor using authentication?  The account I use to connect is an ADS admin account on this remote machine.

    Thanks again for all your help.

     

     

    Wednesday, October 11, 2006 3:55 PM
  • Short answer:

    Using Visual Studio 2005

    In the Solution Explorer, Right click on the project.

    Select the tab Compile

    Push the button Advanced Compile Options

    Uncheck the box enable optimizations. 

     

    Long form.

    <Begin Rant> I have searched for this problem for 4 days using the keywords "No symbols have been loaded for this document", build, configuration manager, release, debug and others.  I found all kinds of helpful information, almost all of it regarding VS 2003.  This includes many articles and help files written by Microsoft pertaining to VS 2005.  They just copied over and relabeled their 2003 documentation, and it is wrong. 

     

    When I found the problem, I searched the web with specific keywords for the answer, and found exactly 1 link, and it was broken. </Begin Rant>

     

    Useful information.  When building a project using 2005, the compiler generates both the release version and the debug version at the same time, hence there are no settings go change your build from debug to release.  However, there is a setting called “enable optimizations”, that will remove the symbols from your code and break remote debugging.  You will  not notice this if it an normal executable, just if you are attaching to a running service, web application, or executable.

     

    Phil

    Friday, April 13, 2007 8:57 PM
  • Hmm, I have the same problem but enable optimizations was already unchecked Sad

    I have the remote debugger set as anonymous, accepting any old idiot for connections.  It says I have connected, VS behaves as if it's debugging, but no breakpoints are hit and the 'no symbols loaded' message is always there.

    Any other ideas?

    Thanks,

    Craig
    Monday, June 04, 2007 10:45 AM
  •  

    For those with the same issue, I got it sorted.  The anonymous route does not work for Managed code..just a restriction by ms.  You have to use windows auth, ie., the default transport.  I was working across domains so had to create local users at client and server with the same account name and password.  I then had to log into both client and server with that user, start the remote debugger on the server and start debugging on the client.  Additionally, I found I also had to add the local user to the administrators group on the server.  I can now successfully remotely debug across domains.

     

    Craig

    Tuesday, June 05, 2007 8:20 AM
  • Craig I have tried all of the above with no success. What do you mean when you say "Additionally, I found I also had to add the local user to the administrators group on the server."?
    Tuesday, June 12, 2007 7:19 PM