No Debug information when debugging a project

No Debug information when debugging a project

I have a Fortran test driver which calls a function in a DLL.  The DLL is built as a C++ project.  The C++ project links an Intel Fortran built LIB of various Fortran subroutines, together with C++ code which contains C++ interfaces to the Fortran functions.  These are for our various C++ / C# GUIs to call.  However I do my testing on these LIB functions with my Fortran driver.  The problem is I am getting invalid debug information for the arrays.  All projects have Debug:Full set.  Here is what the Watch window looks like:

        Fmid_ds    #101B2108    PROCEDURE 
        BlackOilData    #0044C34C    PROCEDURE 
        Weight_fact_data_     Invalid Debug Information    
        Expt_data_     Invalid Debug Information    
+        Ierr    {...}    REAL(8) 

All the above top 4 variables are arrays, and in fact the last, Ierr, is a scalar integer.

The code seems to work fine, but the debug information is not there.  In the Output window I see:

'ViscCorrelations.exe': Loaded 'D:\Tech\Tests\Drivers\DLLHTest\Debug\ViscCorrelations.exe', Symbols loaded.
'ViscCorrelations.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'ViscCorrelations.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'ViscCorrelations.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'ViscCorrelations.exe': Loaded 'D:\Tech\Dev\TechRefactoring\bin\Debug\ViscTune.dll', Symbols loaded.
'ViscCorrelations.exe': Loaded 'C:\Windows\SysWOW64\imagehlp.dll', Cannot find or open the PDB file
'ViscCorrelations.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'ViscCorrelations.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'ViscCorrelations.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'ViscCorrelations.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'ViscCorrelations.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'ViscCorrelations.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'ViscCorrelations.exe': Loaded 'C:\Program Files (x86)\Intel\Composer XE 2013 SP1\redist\ia32\compiler\libifcoremdd.dll', Binary was not built with debug information.
'ViscCorrelations.exe': Loaded 'C:\Program Files (x86)\Intel\Composer XE 2013 SP1\redist\ia32\compiler\libmmd.dll', Symbols loaded (source information stripped).
'ViscCorrelations.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.


So it finds the PDB OK.

I get the same problem if I call the C++ interface function or the Fortran function directly.

Any idea?



12 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You'd have to at least show us the source of the routine in question, including the declarations of the arrays. Also we'd want to know the version of Fortran used and the build options.

All of those "loaded" messages are informational and irrelevant. It's clear that debug information is there from the bit of output you provided. 

Retired 12/31/2016


The caller is:  (the ISO_C_BINDING stuff is for calling the C++ interface which I am not doing, I am calling the Fortran routine directly)

      program TuneBOEMViscCorrelationsTest


      implicit none
      integer :: acorrelations(5)
      integer :: Ifm
      integer :: Ids
      integer :: Idp
      real*8 , allocatable  :: afluidData(:)
      real*8  :: aPVTtuningFactors(12)
      integer, allocatable  :: ExptInfoA(:)
      real*8 , allocatable  :: ExptInfoB(:)
      real*8 , allocatable  :: ExptData(:)
      real*8 , allocatable  :: WeightFactData(:)
      real*8  :: BoundsData(1)
      real*8  :: aEMVtuningMults(4)
        allocate(ExptData(PROP_MAX*Idp))        ; ExptData       = 0.0
        allocate(WeightFactData(PROP_MAX*Ids))  ; WeightFactData = 0.0

        call BOEMVISCTUNE_WRAPPER(aCorrelations,Ifm,Ids,Idp,               &
                                aFluidData,aPVTtuningFactors,              &
                                ExptInfoA,ExptInfoB,ExptData,               &
                                WeightFactData,                            &

and is calling the following function in DLL:

      subroutine BOEMVISCTUNE_WRAPPER(Correlations,Ifm,Ids,Idp,                   &
                                AllBlackOilData,TuningFactors,                    &
                                ExptInfoA,ExptInfoB,Experimental,                 &
                                ExptWeights,                                      &
      use Genexp_env
      use PVT_env
      use BOtuning_env
      use BOPVT_env
      implicit none
!  Input/output variables
      integer*4 Ifm,Idp,Ids,Ierr,Iecode
      integer*4 ExptInfoA(Ids*2), Correlations(5)
      doubleprecision AllBlackOilData(8*Ifm),Experimental(PROP_MAX*Idp),          &
                      ExptWeights(PROP_MAX*Ids),Constraints(1),                   &
                      FinalResults(4),TuningFactors(12),                          &


Seems to have resolved itself, no idea how.  I rebuilt all projects this morning and all is working.

But I did that on Saturday too.  Who knows.


It stopped working again.  I discovered that I get the problem when I build the DLL from Visual Studio.  When I build the DLL from the command line I don't have the problem and I can see all debug information.

This is what I execute from the command line:

devenv AllTechDLL\AllTechDll.sln /clean "Debug"
devenv AllTechDLL\AllTechDll.sln /build "Debug"

The PDB file generated is quite different in each case.  So I guess one PDB works the other doesn't.

Any idea why this is?


Usually this is due to the DLL you're loading not being the one the PDB was built for.

Retired 12/31/2016

Yes I agree that would be a cause.  However in this case bot the DLL and PDB are being loaded from exactly the same place.

And it doesn't explain why the PDB file is different when created from the command line devenv as opposed to via Visual Studio.

Are you using the exact same compile command as shown in the build log? Any differences could change the PDB.

Retired 12/31/2016

I am just running the same SLN file from DEVENV at the command prompt as I am through Visual Studio.  It is responsible for creating the compiler command line.  I assume it should be the same.

Please attach a ZIP with the two buildlog.htm logs, one from the build that works and one from one that doesn't. It was not clear to me before that by "command line" you meant asking VS to build the solution from the command line. Please rename the logs to indicate which is which.

Retired 12/31/2016

Of course now that I try to replicate it, both build methods are working fine!  Grrr.

When it happens again, I will capture the HTM files and submit.

Best Reply

I sometimes have that effect on electronics....

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today