Debug not working on single page

Last post 08-20-2008 12:52 AM by rabia_majid. 4 replies.

Sort Posts:

  • Debug not working on single page

    06-29-2008, 6:24 PM
    • Loading...
    • Broodmdh
    • Joined on 08-18-2005, 4:53 PM
    • Posts 78

    I wasn't sure if this was the correct forum in which to post this, so please bear with me.

     

    I have a single page in my application that refuses to be debugged no matter what I try.  It's in a folder with other pages that I can debug successfully, so I don't understand what is different with this one page.  I've tried deleting the pdb files, and I've rebuilt the application more times than I can count, but nothing seems to work.  I put a breakpoint on the very first line in the code-behind, but it doesn't get hit.  I was originally also getting a "“There is no source code available for the current location" error, but I somehow got rid of that message with my tinkering.  I was wondering if perhaps the compiled application was running with an out of date version of the code, but I don't know how to verify or correct this.  Any ideas?

  • Re: Debug not working on single page

    06-29-2008, 6:48 PM
    • Loading...
    • jimmy q
    • Joined on 11-02-2006, 9:01 AM
    • Australia
    • Posts 2,496
    • Moderator

    What version of visual studio are you using? are you debugging a development copy or a production copy?

    Make sure you are rebuilding a DEBUG build, and your web.config has DEBUG=true. If this still fails, I generally go and delete the ASP.NET temp files and give it another go. 

  • Re: Debug not working on single page

    06-29-2008, 7:08 PM
    • Loading...
    • Broodmdh
    • Joined on 08-18-2005, 4:53 PM
    • Posts 78

    It's VS2005 and I am debugging a development copy.  The web.config does have DEBUG=true and I've already deleted the files found in the 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files' folder.  Deleting those files had no effect, unfortunately. 

  • Re: Debug not working on single page

    07-03-2008, 7:20 AM
    Answer

    Hi,

    "There is no source code available for the current location" means that Visual Studio debugger cannot locate the source file for current location.

    You can try the following ways:

    • Disable debugger to look for source files when debugging (Tools -> Options -> Debugging -> uncheck "Require source files to exactly match the original version").
    • Add the location of this page's source code to "Debug Source Files". (Right-click Solution name in Solution Explorer and select Properties from the shortcut menu. Expand the Common Properties folder, and click the Debug Source Files page)

    For more information about debugging, see http://blogs.msdn.com/jimgries/pages/visual-studio-debugger-faq.aspx (Section: Breakpoints ).

     

    I hope this helps.

     

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Debug not working on single page

    08-20-2008, 12:52 AM
    • Loading...
    • rabia_majid
    • Joined on 05-19-2008, 7:21 AM
    • Posts 1

    hi Thomas Sun

    it works.my error is now remove

    thanks a lot

     

Page 1 of 1 (5 items)
Microsoft Communities
Page view counter