Unable to debug DLL with PDB files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin Horst

    Unable to debug DLL with PDB files

    Hi,

    in VS 2003 I had no problem to debug into a dll with an existing pdb
    file. In VS 2005 and also in VS 2008 I'm not able to debug into the
    source code of the dll. If I try so an explorer window appears where I
    have to choose the location of the source file. The pdb file lies inside
    the debug output directory and belongs to the dll. I'm not sure if I
    missed some settings or what else can be wrong.
    Hope someone has an idea because attaching the project directly is not
    possible (remoting issues).

    Thanks in advance
    Martin
  • shahkalpesh77@gmail.com

    #2
    Re: Unable to debug DLL with PDB files

    Martin,

    I am making a guess here.
    It could be that the target runtime your exe uses (2.0 or above) could
    be different from the framework version you made build using (1.0 or
    1.1)
    or, the DLL could be latest (with code changes) & not in sync with
    pdb.

    MVPs can comment things more appropriately.

    Kalpesh

    Comment

    • Martin Horst

      #3
      Re: Unable to debug DLL with PDB files

      Hi,

      shahkalpesh77@g mail.com schrieb:
      Martin,
      >
      I am making a guess here.
      It could be that the target runtime your exe uses (2.0 or above) could
      be different from the framework version you made build using (1.0 or
      1.1)
      or, the DLL could be latest (with code changes) & not in sync with
      pdb.
      >
      MVPs can comment things more appropriately.
      >
      Kalpesh
      I had the guesses, too. The target runtime is the same, the pdb fit to
      their dll, even the source code lies on the same disk location. I'm
      really at a loss.

      Thanks and greets
      Martin

      Comment

      • wilbain@googlemail.com

        #4
        Re: Unable to debug DLL with PDB files

        On Feb 28, 8:23 am, Martin Horst <pub1-R...@martinhors t.dewrote:
        Hi,
        >
        shahkalpes...@g mail.com schrieb:
        >
        Martin,
        >
        I am making a guess here.
        It could be that the target runtime your exe uses (2.0 or above) could
        be different from the framework version you made build using (1.0 or
        1.1)
        or, the DLL could be latest (with code changes) & not in sync with
        pdb.
        >
        MVPs can comment things more appropriately.
        >
        Kalpesh
        >
        I had the guesses, too. The target runtime is the same, the pdb fit to
        their dll, even the source code lies on the same disk location. I'm
        really at a loss.
        >
        Thanks and greets
        Martin
        If you open up the Modules window of VS 2005 it tells shows you which
        symbols are loaded and if they are not then it tells you why not.

        Comment

        • Martin Horst

          #5
          Re: Unable to debug DLL with PDB files

          Hi,

          wilbain@googlem ail.com schrieb:
          On Feb 28, 8:23 am, Martin Horst <pub1-R...@martinhors t.dewrote:
          >Hi,
          >...
          >
          If you open up the Modules window of VS 2005 it tells shows you which
          symbols are loaded and if they are not then it tells you why not.
          I you can tell where I can find the "modules window", that whould be
          nice. Do you mean the object browser, because I can't find anything like
          "module window".

          Best regards
          Martin

          Comment

          • Jon Skeet [C# MVP]

            #6
            Re: Unable to debug DLL with PDB files

            On Feb 28, 10:16 am, Martin Horst <pub1-R...@martinhors t.dewrote:
            If you open up the Modules window of VS 2005 it tells shows you which
            symbols are loaded and if they are not then it tells you why not.
            >
            I you can tell where I can find the "modules window", that whould be
            nice. Do you mean the object browser, because I can't find anything like
            "module window".
            Debug Windows Modules

            Look up "Modules window" in the MSDN index for more information.

            Jon

            Comment

            • Martin Horst

              #7
              Re: Unable to debug DLL with PDB files

              Hi,

              Jon Skeet [C# MVP] schrieb:
              On Feb 28, 10:16 am, Martin Horst <pub1-R...@martinhors t.dewrote:
              >>If you open up the Modules window of VS 2005 it tells shows you which
              >>symbols are loaded and if they are not then it tells you why not.
              >I you can tell where I can find the "modules window", that whould be
              >nice. Do you mean the object browser, because I can't find anything like
              >"module window".
              >
              Debug Windows Modules
              >
              Look up "Modules window" in the MSDN index for more information.
              >
              Jon
              all right, found it (never used it before). As far as I can see the
              corresponding pdb has be loaded. But if I try to step into the dll code
              the following error message appears: "There is no source code available
              for the current location.".
              I think there is the problem because the dll has been build on a
              different machine. I took a look inside the pdb file and I found the
              directory of the source files. So I created the same directory on my
              machine copied the source file into this directory. But this changed
              anything. Maybe the filetime is importiert, I don't know.
              I go and build the dll on my machine and see what's happening. Maybe
              this is the problem.

              Best regards
              Martin

              Comment

              • Jon Skeet [C# MVP]

                #8
                Re: Unable to debug DLL with PDB files

                On Feb 28, 11:14 am, Martin Horst <pub1-R...@martinhors t.dewrote:

                <snip>
                all right, found it (never used it before). As far as I can see the
                corresponding pdb has be loaded. But if I try to step into the dll code
                the following error message appears: "There is no source code available
                for the current location.".
                I think there is the problem because the dll has been build on a
                different machine. I took a look inside the pdb file and I found the
                directory of the source files. So I created the same directory on my
                machine copied the source file into this directory. But this changed
                anything. Maybe the filetime is importiert, I don't know.
                I go and build the dll on my machine and see what's happening. Maybe
                this is the problem.
                When you copied the source, did you copy the exact same version of the
                source that created the DLL? I believe the PDB contains hashes of the
                source so it can detect changes.

                Jon

                Comment

                Working...