Visual Studio 2008(C ++)附加调试目录? [英] Visual Studio 2008 (C++) additional directories for debugging?

查看:120
本文介绍了Visual Studio 2008(C ++)附加调试目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio的先前版本中,可以在调试应用程序时指定DLL文件的路径。我在版本(2008)中看不到这样做。这是因为在应用程序的目录(ies)中部署所有DLL文件等的应用程序?

In prior versions of Visual Studio one could specify paths for DLL files when debugging an application. I do not see a way to do this in version (2008). Is this due to the move toward deployment of applications with all DLL files, etc. in the application's directory(ies)?

我错过了一些东西,还是没有办法这样做?

Am I missing something, or is there no way to do this?

这是在 Visual C ++ 6.我认为这是菜单工具 - > 选项 > 目录 - >可执行文件。

It was in Visual C++ 6. I think it was menu Tools -> Options -> Directories -> executable files.

也许现在这不是我以为是 - 这可能和我所发现的一样在Visual Studio 2008中。

Perhaps now this was not what I thought it was - this may be the same as what I have found in Visual Studio 2008.

基本上我正在寻找一种方法来附加到PATH环境变量中 - 只是为了运行在Visual Studio中打开的EXE文件项目(没有实际编辑路径环境变量)。

Basically I am looking for a way to "append" to the PATH environment variable - just for running the EXE file project open in Visual Studio (without actually editing the path environment variable).

解决方法是将所有依赖项复制到工作目录。这将工作 - 它只涉及其他项目的一些更改 - 并收集第三方的东西(这是一个巨大的迁移从Visual C ++ 6)。

The workaround is for me to copy all the dependencies to the working directory. That will work - it just involves some changes to other projects - and gathering third-party stuff (this was a huge migration from Visual C++ 6).

推荐答案

它不再这样工作了(自VS 6.0)。今天,一旦DLL文件被进程加载,DLL文件就会收到通知并搜索DLL调试符号。

It doens't work that way anymore (since VS 6.0). Today, once a DLL file is loaded by the process, the DLL file gets a notification and search for the DLL debug symbols.

首先看看DLL文件(DLL可以保留调试符号的路径)。如果没有,它会搜索符号路径(菜单工具 - > 选项 - > 调试 - > 符号)它看起来在窗口目录中。

First it looks inside the DLL file (the DLL can keep the path for the debug symbols). If not, it searches the symbol path (menu Tool -> Options -> Debugging -> Symbols) then it looks inside the window directory.

仅在需要时尝试加载调试符号(例如解析断点),或者手动请求符号加载(在这种情况下,如果符号没有找到,它会提示你)。

It tries to load the debug symbol only if needed (to resolve a breakpoint for example) or if you manually ask the symbols to be loaded (in the case if the symbols were not found, it will prompt you for them).

您可以通过打开模块窗格来查看调试器尝试查找符号的位置(菜单调试 - > 窗口 - > 模块)右键单击模块并选择显示调试信息(它没有Visual Studio在这里,所以它可能被不同的名称调用)。

You can see where the debugger have tried to look for the symbols by openning the modules pane (menu Debug -> Window -> Modules) right clicking on the module and selecting show debug information (it doesn't have Visual Studio here, so it might be called by a different name).

感谢上帝,我们不再需要为每个DLL文件配置路径。

Thanks God(s) that we no longer need to configure the path for each DLL file.

这篇关于Visual Studio 2008(C ++)附加调试目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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