By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,114 Members | 1,570 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,114 IT Pros & Developers. It's quick & easy.

Debug symbols not loading when built on another machine

P: n/a
Hi all,

We are trying to debug an assembly which was built in debug configuration on
our build server. The output window of visual studio indicates that no
symbols are being loaded for the assembly.
However, when the PDB file is copied alongside the dll, the symbols load ok.
We were a little confused, because we had already been debugging this
assembly WITHOUT copying the pdb file.
What I discovered was that when the assembly is built on the machine that is
being used to attach to and debug the process, the symbols load fine. When
the assembly is built on another workstation, whether that be the build
server or another developers workstation, the pdb file needs to sit
alongside the dll for the symbols to load.
I did a binary compare of the 2 assemblies (same source, different build
workstations), and there is only something like 23 bytes difference.
Questions:
1. Can anyone please shed some light on what is going on here?!
2. Are there some good articles on what is loaded as "symbols". i.e. more
insight into what is going on at a lower level here.
3. It seems debug information is embedded into the debug version dll file,
and also externally stored in the pdb file. Otherwise how can the debug dll
be debugged at all without a pdb file?

Cheers very much,

Bardo
Oct 26 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Bardo wrote:
Hi all,

We are trying to debug an assembly which was built in debug
configuration on our build server. The output window of visual
studio indicates that no symbols are being loaded for the assembly.
However, when the PDB file is copied alongside the dll, the symbols
load ok. We were a little confused, because we had already been
debugging this assembly WITHOUT copying the pdb file.
What I discovered was that when the assembly is built on the machine
that is being used to attach to and debug the process, the symbols
load fine. When the assembly is built on another workstation,
whether that be the build server or another developers workstation,
the pdb file needs to sit alongside the dll for the symbols to load.
I did a binary compare of the 2 assemblies (same source, different
build workstations), and there is only something like 23 bytes
difference. Questions:
1. Can anyone please shed some light on what is going on here?!
2. Are there some good articles on what is loaded as "symbols". i.e.
more insight into what is going on at a lower level here.
3. It seems debug information is embedded into the debug version dll
file, and also externally stored in the pdb file. Otherwise how can
the debug dll be debugged at all without a pdb file?
Debug info is stored in the PDB file only. The brinary (DLL or EXE)
contains the absolute path to the location where the PDB file was when the
DLL was built. The debugger tries to load the PDB file from that absolute
path or from the same directory as the DLL/EXE. The DLL/EXE also contains a
timestamp which is replicated in the PDB file - if the timestamps don't
match, the PDB won't be loaded.

-cd
Oct 26 '06 #2

P: n/a
Hi Carl,

thanks for the reply. That fits in with what we are experiencing.
Although I can envisage a number of issues when trying to debug assemblies
that are deployed via script to the local GAC from the build server! This
means we will need to manually copy the PDB file for each assembly GAC'd,
which also means determining the version to know where to copy the file
based on the GAC directory structure.
Is there some common way of doing this sort of thing?
I saw that you can have a "Symbol Server" and point your VS2005 solution at
a common directory etc. Not sure what happens though when you end up with
symbols on both local machine (from debugging sessions) and also on the
build server...
Do you have any thoughts on this at all? Or am I going down the wrong path?

Cheers,

Bardo

"Carl Daniel [VC++ MVP]" <cp*****************************@mvps.org.nospam >
wrote in message news:uk****************@TK2MSFTNGP03.phx.gbl...
Bardo wrote:
>Hi all,

We are trying to debug an assembly which was built in debug
configuration on our build server. The output window of visual
studio indicates that no symbols are being loaded for the assembly.
However, when the PDB file is copied alongside the dll, the symbols
load ok. We were a little confused, because we had already been
debugging this assembly WITHOUT copying the pdb file.
What I discovered was that when the assembly is built on the machine
that is being used to attach to and debug the process, the symbols
load fine. When the assembly is built on another workstation,
whether that be the build server or another developers workstation,
the pdb file needs to sit alongside the dll for the symbols to load.
I did a binary compare of the 2 assemblies (same source, different
build workstations), and there is only something like 23 bytes
difference. Questions:
1. Can anyone please shed some light on what is going on here?!
2. Are there some good articles on what is loaded as "symbols". i.e.
more insight into what is going on at a lower level here.
3. It seems debug information is embedded into the debug version dll
file, and also externally stored in the pdb file. Otherwise how can
the debug dll be debugged at all without a pdb file?

Debug info is stored in the PDB file only. The brinary (DLL or EXE)
contains the absolute path to the location where the PDB file was when the
DLL was built. The debugger tries to load the PDB file from that absolute
path or from the same directory as the DLL/EXE. The DLL/EXE also contains
a timestamp which is replicated in the PDB file - if the timestamps don't
match, the PDB won't be loaded.

-cd

Oct 27 '06 #3

P: n/a
Bardo wrote:
Hi Carl,

thanks for the reply. That fits in with what we are experiencing.
Although I can envisage a number of issues when trying to debug
assemblies that are deployed via script to the local GAC from the
build server! This means we will need to manually copy the PDB file
for each assembly GAC'd, which also means determining the version to
know where to copy the file based on the GAC directory structure.
Is there some common way of doing this sort of thing?
I saw that you can have a "Symbol Server" and point your VS2005
solution at a common directory etc. Not sure what happens though when
you end up with symbols on both local machine (from debugging
sessions) and also on the build server...
Do you have any thoughts on this at all? Or am I going down the wrong
path?
I haven't played with the symbol server, but my understanding is that you
can set up a local symbol server, configure your VS installations to point
to it, and deploy your PDB files to the symbol server as part of your
build/distribution process, so it might work well in your situation.

-cd
Oct 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.