473,395 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Debug symbols not loading when built on another machine

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
3 4237
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mihajlo Cvetanović | last post by:
My application crashed (with the "cannot read memory, press OK to terminate or Cancel to debug" message) on the machine that has VC7.1. I just copied the original project with pdb file to that...
4
by: jim | last post by:
I am trying to debug a user written web control and web control designer. I found an article “Building Windows Forms Controls and Component with Rich Design-Time Features” that describes how...
8
by: | last post by:
I'm starting up the development server myself and using the "Startup Url" property of the web project. The problem is i cannot debug. The debug symbols are never loaded. I realize they are under...
10
by: Brett | last post by:
For some reason when I step into the code below, it jumps out on the second iteration at the line I have marked below. Nothing else happens - no errors. Dim tcpClient As New...
3
by: Bardo | last post by:
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...
7
by: 2b|!2b==? | last post by:
I am attempting to manually load debug symbols for a module. I am doing it by carrying out the ff steps: i). Select the call stack window ii). right click and select 'Load Symbols' from...
2
by: Joe Stateson | last post by:
I added ajax to an existing web project. It runs fine but hitting F5 (debug) in Visual Studio 2005 slowly consumes resources: Kernel Memory and System Cache grow and I start seeing "Loading...
4
by: Mr Gray | last post by:
Hello, I am using VS.NET 2003 and have multiple projects in my solution and an asp.net web app which is the startup project. I have inherited this project from someone else and am trying to...
3
by: Dave Cullen | last post by:
It seems I have fallen victim to some strange behavior in VS2005 where it refuses to allow breakpoints to be hit during debug in my dll project. The breakpoint ball says, "breakpoint will not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.