Can't debug - “The breakpoint will not currently be hit. No symbols have been loaded for this document”

前端 未结 6 1332
隐瞒了意图╮
隐瞒了意图╮ 2020-12-29 08:04

I\'m getting the error in the subject line. I\'m running vs2k8 on server 2k3sp2. I\'ve tried deleting the pdbs, cache directories, verifying that debugging is set up on the

6条回答
  •  时光说笑
    2020-12-29 08:22

    If you have a "WebSite" project, rather than "WebApplication", I've found that overlapping code file classes can cause the issue. There are a few ways this can happen. Unfortunately Visual Studio still seems to compile the solution/project without error.

    1. Moving pages between folders on the web site.
    2. Source control merging after moving pages can cause pages to be duplicated and Visual Studio gets confused during debugging.
    3. Copy and pasting existing pages (templates) could also cause this from memory.

    To resolve the issue I

    1. Search for "Class TheProblemPageCodeSymbolIssue" for duplicates in the solution.
    2. Re-factored those duplicated code behind class names and tested all those pages, to ensure I could use debug breakpoints.

    Hope that helps.

提交回复
热议问题