none
source file is different from when the module was built

    Question

  • I'm working with VS2008 SE and have created a small MFC dialog based application to test stepping into and viewing MFC code.   In debugging mode, I am not able to step into the following MFC code (or any other MFC code):

     

    CString str;
    str.LoadString( -1 );

    CFileDialog dlg( TRUE, NULL, NULL, 4|2, NULL, this );
    dlg.DoModal();

    I receive an error message that the source file is different from when the module was built.   I would appreciate any suggestions on how to correct this problem.

     


    Thanks,

    Ian

    Points of interest:

    1.     I confirm the MFC code and header files exist in the following directories:

                c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\src\mfc

     

    2.     Enabling and viewing the pro-processor file (i.e. setting /P) shows the correct header files are being called.

     

    3.     In [Tools][Options][Debugging][Symbols], the option [Symbol file (.pdb) locations] has been set to ‘http://msdl.microsoft.com/download/symbols’

     

    4.     In [Tools][Options][Debugging][General], [Enable source server support] has been checked (i.e. enabled)

     

    5.     In [Tools][Options][Debugging][Symbols], the button [Load symbols using above locations] is disabled in VS2008.   Simiilarly, the button [Load symbols from Microsoft symbol servers] is also disabled in VS2008.  I also have VS2005 PE and neither of these buttons is disabled  in VS2005.

    6.     I’ve reinstalled VS2008 several times but the problem persists

     

    7.     I also have VS2005 PE installed and am successfully able to step into the MFC code. 

     

    8.     My computer: notebook running Vista Home Premium x64, 4 Gig RAM

     

     

     

    Thursday, September 17, 2009 8:57 PM

Answers

  • Yes, I cleared and then re-built the project many times.  

    What I noticed  was that the .pdb database files in 'c:\windows\symbols\dll\' were were not all being updated each time I ran windows automatic upgrade.   A google search suggested several of these files might have been out of date.  

    I uninstalled every reference to a 2008 application in [Control Panel][Programs][Programs and Features].   I then rebooted and reinstalled VS2008 SE.  Next, instead of using the Windows automatic upgrade feature, I manually downloaded and installed VS2008 SP1.   Priliminary tests indicate this has corrected the problem.

    Ian
    • Marked as answer by IB00 Friday, September 18, 2009 1:07 AM
    Friday, September 18, 2009 1:07 AM

All replies

  • I might have an answer to this problem so and will get back with more information tomorrow.

    Ian
    Thursday, September 17, 2009 11:51 PM
  • The error means exactly that, after the project was built the source file was modified.
    Does this happen if you do a full rebuild of the project?
    Visit my (not very good) blog at http://c2kblog.blogspot.com/
    Friday, September 18, 2009 12:28 AM
  • Yes, I cleared and then re-built the project many times.  

    What I noticed  was that the .pdb database files in 'c:\windows\symbols\dll\' were were not all being updated each time I ran windows automatic upgrade.   A google search suggested several of these files might have been out of date.  

    I uninstalled every reference to a 2008 application in [Control Panel][Programs][Programs and Features].   I then rebooted and reinstalled VS2008 SE.  Next, instead of using the Windows automatic upgrade feature, I manually downloaded and installed VS2008 SP1.   Priliminary tests indicate this has corrected the problem.

    Ian
    • Marked as answer by IB00 Friday, September 18, 2009 1:07 AM
    Friday, September 18, 2009 1:07 AM