3

I've found this question many times on Google and on StackOverflow, though none answer my scenario.

I'm trying to remotely debug a web service, remote debugging is set up correctly, I've deployed the latest build (along with pdb files) and attached the debugger to the w3wp process on the remote machine. Once attached however, all of my break points are automatically disabled (Breakpoint will not currently be hit. No symbols have been loaded for this document). Does anyone know what I am doing wrong?

I've tried the following so far:

  • set 'Generate Debug Information' to 'FULL' in advanced compile options.
  • set 'Enable Optimisations' to 'False' in advanced compile options.
  • In the Modules window the symbol status is 'Skipped loading symbols
    • tried loading symbols manually
    • tried changing symbol file locations in symbol settings to the remote pdb file
  • cleaned and rebuild the solution before deployment
  • I tried unchecking 'Just My Code' in the debugging options, that appeared to solve the problem, but when I called the web service, no break points were hit.
  • This site looked promising, but didn't help in the end
  • the pdb is on the remote machine
Community
  • 1
  • 1
Mr Shoubs
  • 14,629
  • 17
  • 68
  • 107

3 Answers3

3

After much messing around I seemed to have achived what I wanted:

  • in advanced compile options
    • set 'Generate Debug Information' to 'FULL'.
    • set 'Enable Optimisations' to 'False'.
  • Ensure symbol file locations (debug - modules window) in symbol settings point to the correct location
    • I added the remote location and the local location to the .pdb locations
  • cleaned and rebuild the solution before deployment
Mr Shoubs
  • 14,629
  • 17
  • 68
  • 107
0

In my case, I had the pdb's deployed to the iis worker process path, so all was supposed to be good, and I really couldn't see why "Skipped loading symbols" was appearing. I really got the impression it just was not in the mood (no rational reason).

So i right clicked on the dll I was interested in debugging (can select multiple files also), and chose Load Symbols From > Symbol Path

and that caused them to be loaded.

Then I could debug it. Thanks!

toddmo
  • 20,682
  • 14
  • 97
  • 107
0

I've never found a sure fire way to get this to work. When attempting to debug a WCF service hosted in IIS, following the same process over and over (ReBuild, Deploy, Restart Site, Attach) I would sometimes have the symbols loaded, sometimes not.

In my case, it came down to whether I attached to the process before somebody made a request against the site after I had deployed (in turn causing IIS to compile and do its funky stuff).

I found that if I followed these steps, it worked for me:

  1. Rebuild Solution
  2. Deploy to Remote Server
  3. Restart IIS - I doubt this is necessary, restarting the app pool would suffice I'm sure
  4. Locate the Worker Process and Attach to it - Breakpoints will be disabled at this point, that was fine
  5. Request something from the site - I did this just using a browser. This caused IIS to compile my app. By having VS attached prior to this compile, I found I was getting the symbols loaded (at least much more often than before).

Maybe the same process will work for you?

Smudge202
  • 4,689
  • 2
  • 26
  • 44
  • The w3wp process doesn't exist to attach the debugger to, until I request something from the site or load it in the browser (this isn't WCF so maybe it works differently in that respect). – Mr Shoubs May 25 '11 at 10:39
  • Perhaps, or perhaps I've forgotten the steps I followed already... ^^ One other obvious thing, are you compiling the web project with a debug configuration? Its often missed, but if the deployed project is compiled with the release configuration you won't be able to catch break points after attaching – Smudge202 May 25 '11 at 12:03
  • I checked that. I have fixed the problem now. – Mr Shoubs May 25 '11 at 16:05