开发者

The Breakpoint Will Not Currently Be Hit. No Symbols Have Been Loaded For This Document

开发者 https://www.devze.com 2023-02-28 17:37 出处:网络
I\'ve Googled this particular problem, but cannot seem to find a working solution. Symptoms:After adding a breakpoint in the codebehind for an aspx page in a web application project, the breakpoint d

I've Googled this particular problem, but cannot seem to find a working solution.

Symptoms: After adding a breakpoint in the codebehind for an aspx page in a web application project, the breakpoint displays in the margin as a hollowed out red circle with an exclamation point enclosed in a yellow tr开发者_开发百科iangle in the bottom right of the circle. When mousing over the breakpoint, the message "The breakpoint will not currently be hit. No symbols have been loaded for this document."

Note: I'm trying to hit the breakpoints by "attaching to [a] process", namely w3wp.exe, located on a remote computer.

Things I have tried.

  1. Recompiling other projects in the solution.
  2. Checking to make sure that the configuration for each of the projects and the website in the solution is set to "Debug" on "any pc".
  3. Closing the solution and restarting Visual Studio.
  4. Restarting IIS.
  5. Reattaching to the process (w3wp.exe).

I've been trying to hit the breakpoints using Internet Explorer version 9 and Mozilla FireFox version 4. In each case, the breakpoints are never hit.

Any ideas are welcome! Thanks!

Andrew


If you have more than one solution in your project.

Right click on your solution --> Properties

Set as --> Startup Project


Are you deploying your assemblies to the GAC? If not, copy the .pdb file along with the .dll file, placing both in the same bin directory. The debugger should pick up the symbols automatically.


I run into the same problem and guess what? Just do it: At solution explorer, right click on Project -> Package/Publish Settings UNCHECK "Exclude generated debug symbols"...

Maybe it can't solve your specific problem but certainly it will save another people from suffering. I can't post a screenshot because I don't have 10 of reputation... :(

Like you guys I lost all day searching on google and stackoverflow and the problem was just that. I realized that when I saw the PDB file in the bin folder ready to be published becoming 0 bytes size when I clicked "publish"...


In my case I was trying to debug an ASP.NET Core app hosted in IIS. I noticed that when I published the app (dotnet publish) the generated web.config had this line:

 <aspNetCore processPath=".\MyService.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />

I had to attach to MyService.exe rather than w3wp.exe to debug the app even though it was running in IIS.


This error produce by many reason, one solution is : its due to different framework version when you try to attach process. For more details, please visit: https://stackoverflow.com/a/13106908/1218422


I realize that this is an old thread, but the one thing that nobody mentioned was to make sure that debugging is enabled in the web.config file.


I had the same problem, fixed it by switching the debugging method. I was clicking F5 with web project set to startup project (and the "Don't open a page. Wait for a request from an external applicaton" selected in project settings).

When I attached VS debugger manually to the w3wp.exe process using the debug menu it worked.

0

精彩评论

暂无评论...
验证码 换一张
取 消