To debug the Crystal Report function, a crystal report website (vs2010, windows2008, iis7, Based on. NET 4.0) is created temporarily. When attach process is required for debugging, an error occurs:
"Breakpoint will not currently be hit. No symbols loaded for this document."
If you directly debug F5, it will successfully enter the breakpoint, But attach process will fail to hit.
The solution or steps are as follows:
Step 1. Stop the WWW Services Service first
1) Open Administrative Tools and select Services.
2) In the Services control panel, stop the world wide web Hing service.
Step 2. Stop the website you want to debug and simply stop it in IIS.
Step 3. Delete the directory c: \ windows \ microsoft.net \ framework \ v4.0.30319 \ temporary ASP. NET files
(Depending on the. NET Framework version of the project. because this project is Based on. NET 4.0, files in temporary ASP. NET files under the corresponding framework version are deleted)
Step 4. Delete the PDB and DLL file files in the bin or OBJ directory of the project.
Note: If the debuggerfile does not have an award file, breakpoin will not be hit, so ensure that the debugger must have loaded the symbols content. We can perform the following checks:
Debug-> Windows-> modules, select your DLL module, and check whether the PDF file has been added. If not, we may manually load the file: right click the DLL model-> select load symbols
Step 5. Check the Web. config file of the vs2010 project and add <compilation DEBUG = "true">
<System. Web>
<Deployment retail = "true"/>
</System. Web>
Step 6. Use vs2010 to re-publish the website and select the emit the debug information item on the release properties page.
Step 7. Restart WWW services and IIS
(Start Menu -- run -- cmd -- c: \> iisreset/restart in the command line mode), and debug the project through attach process again.
Generally, after the above steps, most problems will be solved. If there is still a situation where hit is not available, the specific problem should be analyzed,
The following is a useful reference link.
Visual Studio debugger FAQ: http://blogs.msdn.com/ B /jimgries/archive/2007/08/07/visual-studio-debugger-faq.aspx
Debugger doesn't work: http://blogs.msdn.com/ B /mkpark/archive/2004/03/09/86872.aspxBreakpointBreakpoint
Will not currently be hit: http://www.visualstudiodev.com/visual-studio-debugger/breakpoint-will-not-currently-be-hit-no-symbols-loaded-for-this-document-11902.shtml