从Lib中删除PDB文件/功能(Remove the PDB file/functionality from Lib)
我遇到了以下情况,我被要求重建一个网站,原始网站已经建成,解决方案有5个项目,其中4个是不同的数据层,其中一个是实际的网站。
我只有4个项目的dll,到目前为止我已经设法重建网站并将dll添加到我的项目中,让我可以访问实体和存储库层等等......一切都很好。
问题是,当我运行项目时,调试器试图查找我添加的dll的源文件,我没有。 有没有办法从我添加的dll中删除PDB文件/功能? 我不需要或想要调试那些dll,因为我知道它们正常工作......如果它们不是,我没有代码来更改它们。
或者以另一种方式询问它,有没有办法将它们添加到我的项目中并强制它们不能与调试器一起运行?
谢谢
I'm stuck in the following situation, I have been asked to rebuild a website, the original site was built and the solution had 5 projects, 4 of these where the different data layers and one of them was the actual website.
I only have the dll's of the 4 projects, so far I've managed to rebuild the website and adding the dll's to my project gives me access to the Entities and Repository layer etc... everything builds fine.
The problem is that when I run the project the debugger is trying to look for the Source files of the dll's that I've added which I don't have. Is there a way to remove the PDB file/functionality from the dll's that I've added? I don't need to or want to debug those dll's as I know that they are working correctly... and I dont have the code to change them if they arent.
Or to ask it in another way, is there a way to add them to my project and force them to not run with the Debugger?
Thanks
最满意答案
好的,所以要解决这个问题,我不得不反编译四个项目的lib,创建代码文件并将其放在PDB文件中指定的确切目录中,然后编译并运行网站。
我不认为它关心源文件没有再次编译,它只需要知道它们在哪里。
运行网站后,我可以删除创建的路径和源文件,我没有遇到任何问题。
Ok, so to solve this problem I had to decompile the lib's of the four projects, create and place the code files in the exact directory that is specified in the PDB files and then compile and run the website.
I dont think it cared that the source files didn't compile again, it just needed to know that they where there.
After running the site i could delete the created path and source files and I haven't had a problem since.
相关问答
更多-
首先这些是警告,而不是错误,其次看起来就像链接Qt库的调试版本与VC库的发布配置文件一样......构建配置文件有问题...但它只是警告,如果您不需要VC的调试工具组件,你可以忽略这个警告......。 如果你使用VS2010编译器并且会使用win SDK组件,并且没有任何与你使用的VC之间的依赖关系有关的问题,Qt(它是用mingw !?编译的)的依赖关系等等......只需下载Qt源代码,用你的VS编译它们,安装VS加载项并在VS中使用Qt ... First of all these are warn ...
-
如何使用PDB文件?(How do I use PDB files)[2022-03-19]
构建项目时会生成PDB文件。 它们包含与Visual Studio可以解释的内置二进制文件相关的信息。 当程序崩溃并生成崩溃报告时,Visual Studio可以通过应用程序的PDB文件获取该报告并将其链接回源代码。 PDB文件必须由生成崩溃报告的相同的二进制码构建! 随着时间的推移,我们遇到了一些问题。 调试崩溃报告的机器需要将源与建立二进制文件的机器在同一路径上。 发布版本经常优化到无法查看对象成员变量状态的程度 如果有人知道如何打败前者,我将不胜感激。 PDB files are generated ... -
什么是PDB文件?(What is a PDB file?)[2022-04-09]
PDB文件包含调试器使用的信息。 发布版本中的信息少于调试版本。 但是如果您希望根本不需要生成,请转到项目的Build属性,选择Release配置,单击“Advanced ...”,然后在“Debug Info”中选择“None”。 A PDB file contains information for the debugger to work with. There's less information in a Release build than in a Debug build anyway. Bu ... -
post_mortem方法需要一个traceback对象,而不是Trace对象。 可以从except块内的sys.exec_info()[2]获取回溯对象,也可以直接调用不带参数的pdb.post_mortem() (在except块中)。 但无论哪种方式,您必须先捕获异常才能进行调试。 The post_mortem method wants a traceback object, not a Trace object. Traceback objects can be acquired from sys ...
-
好的,所以要解决这个问题,我不得不反编译四个项目的lib,创建代码文件并将其放在PDB文件中指定的确切目录中,然后编译并运行网站。 我不认为它关心源文件没有再次编译,它只需要知道它们在哪里。 运行网站后,我可以删除创建的路径和源文件,我没有遇到任何问题。 Ok, so to solve this problem I had to decompile the lib's of the four projects, create and place the code files in the exact dir ...
-
我是如何搞砸python pdb的(How did I mess up python pdb)[2022-02-02]
我设法解决了这个问题。 显然,pip存储库中有另一个名为pdb模块用于共享密码管理。 每次尝试pip install pdb我不知道我的机器安装了错误的模块。 pdb模块(python调试器)随产品一起提供,当您将它安装到您的系统或Linux Ubuntu时,它将包含在位于/usr/lib/python2.7的分发版中,而不是第三方模块它被安装在/usr/local/lib/python2.7下。 对于一些奇怪的,未知的原因(我想安装ipdb导致这种情况),我没有我的预先发货的python模块下的pdb.p ... -
您可以尝试在emacs中设置环境变量(例如放入.emacs或使用M- .emacs (setenv "PYTHONPATH" "lib") you can try to set the environment variable with in the emacs (say putting in .emacs or using M-:) like this (setenv "PYTHONPATH" "lib")
-
pdb不能这样做。 但是你可以在自己的程序中自己构建它,有两种方法。 第一种方法是简单地使用全局变量来控制断点条目。 像这样的东西将是非常微不足道的(简单的例子): _breakpoints = {} def reset_breakpoints(disabled=[]): global _breakpoints _breakpoints = dict((x, False) for x in disabled) def set_breakpoint(tag, condition=True) ...
-
找出你的miniconda安装的位置,对我来说它是: 〜/ miniconda2 确保你的.bashrc PATH 在任何默认的linux安装之前都在拿起miniconda python安装,即在/usr/bin/之前查看~/miniconda2/bin Dired ~/miniconda2/lib/python2.7 'S'为pdb.py创建一个软符号链接,将链接放在~/miniconda2/bin并将其pdb2.7 Dired ~/miniconda2/bin 'S'为pdb2.7创建一个软符号链接,将 ...
-
该项目缺少/ Zi参数 。 显然,这仍然会导致编译器生成可以成功加载的PDB文件,它只是没有任何有用的符号。 不知道为什么。 The project was missing the /Zi parameter. Apparently this still causes the compiler to generate a PDB file that can be successfully loaded, it just doesn't have any useful symbols in it. No id ...