当前不会命中 VS 2008 断点.尚未为该文档加载任何符号 [英] VS 2008 breakpoint will not currently be hit. No symbols have been loaded for this document

查看:15
本文介绍了当前不会命中 VS 2008 断点.尚未为该文档加载任何符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力克服这个障碍,我非常希望 SO 上的某个人可以提供帮助.

当我在我的类库项目中设置断点时.它显示为一个正常的断点.当我开始调试我的解决方案时,

I am struggling to overcome this obstacle and I have high hopes that someone on SO can help.

When I set a breakpoint in my class library project. It appears as a normal breakpoint. When I start debugging my solution the breakpoint becomes hollowed out and has a yellow triangle with an exclamation point inside. The tooltip displayed when I pan over the breakpoint is, "The Breakpoint will not currently be hit. No Symbols have been loaded for this document."

This project is not an ASP.NET application, it is simply a winForms application.

I have taken over an existing winForms application with multiple projects in the solution. I have the project built and running in debug mode. I can stop at breakpoints in some projects but, I am unable to hit the breakpoints in other projects specifically my project that is of type class library.

What I have done thus far:

  • I have deleted all debug and release folders,
  • I have deleted the obj folder, and have rebuilt the solution afterwards.
  • I have restarted the VS2008 IDE.
  • I have restarted my computer.
  • I checked the Configuration Manager for the solution to ensure that my class project is included in the debug build, and it is.
  • I have checked the debug/modules for dll, although I am not trying to reference a dll.

Furthermore, I have followed the troubleshooting steps outlined in the SO posts:

the breakpoint will not currently be hit no symbols loaded

VS 2010, NUNit, and "The breakpoint will not currently be hit. No symbols have been loaded for this document"

The breakpoint will not currently be hit. No symbols have been loaded for this document.

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

Fixing "The breakpoint will not currently be hit. No symbols have been loaded for this document."

Additionally, I have read numerous posts found on Google from both MSDN and other locations, none of which fit my specific needs.

Some of these posts are:

Visual Studio 2008 "The breakpoint will not be currently hit. No symbols have been loaded for this document"

The breakpoint will not currently be hit. No symbols have been loaded for this document

Breakpoint will not currently be hit. No symbols loaded for this document.

Debugger problem "The breakpoint will not currently be hit. No symbols have been loaded for this document

The Breakpoint will not currently be hit. No Symbols have been loaded for this document.

All of the posts I have read have been very informative, but none of the suggested solutions have fit my specific needs. Please let me know if more information is warranted. I have more links I can provide as references to what has not worked. As well as additional steps I have taken to attempt to solve this issue.

I am posting this follow-up to keep everyone aprised. I followed @Hans @ suggestion to call the project file in question.

I placed a dim frm as form = new ProjectInQuestion.FormInQuestion

and

this now has the assembly loading in the debug--> Windows->Modules

The new problem is more perplexing than my original issue. My breakpoints look fine, but are being skipped. There are no error evident at the breakpoint.

解决方案

This may be an old question, but I wanted to answer it after I found a solution for this very problem because it was one of the most complete questions asked in regards to this topic.

Intro

My project is an ASP.NET application, but the base problem will happen on WinForms as well. The problem arises when a DLL is missing from the assemblies output. However, this same exception occurs if the DLL you are referencing then references another DLL that is not in the assemblies. Due to the way the operating system loads DLLs, the referenced DLL must be in the environment path, and not in your output assemblies.

Project A references DLL D. DLL D references DLL X. DLL D may be in your output assemblies. DLL X must be in your environment path.

The core cause to this problem is in the way the operating system loads native DLL's at >runtime. Native DLL's are loaded using the following logic which does not include the >Temporary ASP.net Files nor the applications /bin folder. This problem will also occur in >any .Net application if the Native DLL is not included in the /bin folder with the .EXE >file or if the DLL is not in the Path Environment Variable.

Personal Solution

I was using a DLL called DivaAPIWrapper.dll (Managed DLL for C#). I knew, however, that DivaAPIWrapper.dll needed DivaAPI.dll (Unmanaged C++) to operate. I placed DivaAPI.dll in all my output paths but I kept receiving this error. Only after I placed DivaAPI.dll in my environment path (C:windowsMicrosoft.NetFrameworkv2.0.50727) did it work. Please note: your path may be different if you're using a newer version of the .NET framework!

Complete Solution by Jerry Orman

See Link Here: http://blogs.msdn.com/b/jorman/archive/2007/08/31/loading-c-assemblies-in-asp-net.aspx

这篇关于当前不会命中 VS 2008 断点.尚未为该文档加载任何符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆