Original Source Dialog
Blitz357
Posts: 3
Hi, I am in a situation where I have another person profiling and sending me results from a production/customer site and I am analyzing them at my dev site. We have the pdb's at the customer site so I am able to use the original source dialog (when I click on a method in Ants) to link the source code with the method. The problem I am seeing is the Original Source Code Dialog isn't popping up for all of "my" methods. I know of at least a couple of classes that this issue is occuring. Is there a way to force the Original Source Code Dialog to pop up? Is there a problem with my pdb maybe? Is there a way to tell if the methods that aren't displaying the source code dialog have pdb info tied to them in Ants?
Thanks for your help.
-Jason
Thanks for your help.
-Jason
Comments
Profiler relies on the PDB to get the filespec for the source code, so more than likely, the PDB is not installed for your assembly at your customer's site. If no PDB is present there, the "source file" column is not populated and you will never be asked for the source code location.
ANTS Profiler prompts for the source location only when the PDB points to a source file which does not exist on your local file system. If the source information is empty, you will not be prompted. Otherwise, you would be potentially be prompted for all of the source code locations of all of Microsoft's Framework Class Libraries, which you'll never, ever get unless you're given them by MS. Prompting for the source location of all of these methods would be really annoying, so you are not prompted unless there is a "known" source code location.
I hope this explains the method behind the madness a bit!
To add to your point about the pdb's. They not only have to be present they have to be from the same build as the dlls you're profiling. The problem I was seeing is that I had the pdb's yet couldn't get a source code location in Ants. I ran a program called "chkmatch" and that tells you if your pdb has the same signature as your dll. If they are not matching Ants must just ignore the pdb (which it should). Our Configuration Management group had our build pdbs copied from a different location so the signatures didn't match our dlls. Anyway, I got that problem fixed and things are working smoothly.
As a side question here. I noticed that if the source code dialog pops up once and you hit cancel, it doesn't pop up again for the same file unless you shut down Ants and restart. If this happens can you force it to open by a hot key or something? I have had this happen a couple of times. I finally copied all the source from my dev location to where the pdbs expected it. The source code dialog can drive you mad after awhile if you have enough different files to find.
Anyway, thanks again for the reply.
-Jason
Unfortunately I don't think there is a way to re-enable the source code box in ANTS Profiler 3. We are getting close to releasing a beta of ANTS Prfiler 4 so I will talk to the team about making sure that it is possible in ANTS Profiler 4. We have tried to improve the situation with remapping pdb paths to another location in V4 so hopefully that should make your life easier as well.
You can get a recent build of ANTS Profiler 4 from our EAP forum (http://www.red-gate.com/MessageBoard/viewforum.php?f=80) if you want to give it a try.
James
Head of DBA Tools
Red Gate Software Ltd