首页 \ 问答 \ 从Lib中删除PDB文件/功能(Remove the PDB file/functionality from Lib)

从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

更新时间:2023-02-04 12:02

最满意答案

好的,所以要解决这个问题,我不得不反编译四个项目的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文件。 它们包含与Visual Studio可以解释的内置二进制文件相关的信息。 当程序崩溃并生成崩溃报告时,Visual Studio可以通过应用程序的PDB文件获取该报告并将其链接回源代码。 PDB文件必须由生成崩溃报告的相同的二进制码构建! 随着时间的推移,我们遇到了一些问题。 调试崩溃报告的机器需要将源与建立二进制文件的机器在同一路径上。 发布版本经常优化到无法查看对象成员变量状态的程度 如果有人知道如何打败前者,我将不胜感激。 PDB files are generated ...
  • 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 ...
  • 我设法解决了这个问题。 显然,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 ...

相关文章

更多

最新问答

更多
  • 在csproj中使用appdata环境变量(Use appdata environment variable in csproj)
  • 从背景返回后,Skobbler Map崩溃(Skobbler Map crashes after returning from background)
  • 如何保持对绑定服务的轮询?(How to keep polling a bound service?)
  • ASP.NET单选按钮jQuery处理(ASP.NET radio button jQuery handling)
  • Linux上的FORTRAN图形库(FORTRAN graphic library on Linux)
  • 我们如何根据索引更新dynamodb表(不基于primary has和range key)(how can we update dynamodb table based on index(not based on primary has and range key))
  • 功能包装避免重复(wrap of functions avoid duplicating)
  • Android BroadcastReceiver和Activity.onPause()(Android BroadcastReceiver and Activity.onPause())
  • 无法使用phonegap 2.4在Android上播放录音(unable to play audio recordings on android using phonegap 2.4)
  • VS2015 + Resharper:不要使用C#6(VS2015 + Resharper: Don't use C#6)
  • 大学电脑四级对初学者来说要多久能过
  • 特殊字符删除?(Special characters remove?)
  • Android视频教程现在网上的都比较零散呢?有些太坑爹了,感觉老师就是在想当然的讲
  • 计算同一个表中不同行之间的差异[重复](Calculate delta's between different rows in same table [duplicate])
  • Javaweb开发,技术路线是什么?该怎么写?
  • JavaScript只在php代码中执行一次(JavaScript only executes once inside php code)
  • 不兼容的字符编码:ASCII-8BIT和UTF-8(incompatible character encodings: ASCII-8BIT and UTF-8)
  • Clojure(加载文件)给出错误(Clojure (load-file) gives an error)
  • 为具有瞬态scala依赖性的spring-xd项目优化gradle(Optimize gradle for spring-xd project with transient scala dependency)
  • 如何才能在Alpha测试模式下发布我的应用程序?(How can I publish my app in Alpha test mode only?)
  • “没有为此目标安装系统映像”Xamarin AVD Manager(“No system images installed for this target” Xamarin AVD Manager)
  • maven中的Scalatest:JUnit结果(Scalatest in maven: JUnit results)
  • 使用android SDK将文件直接上传到存储桶中的文件夹(Upload a file directly to a folder in bucket using android SDK)
  • 是否应将plists导入CoreData?(Should plists be imported to CoreData?)
  • java.lang.reflect.InvocationTargetException JavaFX TableView(java.lang.reflect.InvocationTargetException JavaFX TableView)
  • 根据唯一列值动态创建多个子集(Dynamically create multiple subsets based on unique column values)
  • 使用CSS可以使HTML锚标签不可点击/可链接吗?(Is it possible to make an HTML anchor tag not clickable/linkable using CSS?)
  • 嵌套的模板可能性(Nested template possibilities)
  • 任何方式在iOS7 +上以编程方式打开蓝牙(Any way to turn on bluetooth programmatically on iOS7+)
  • 如何为给定的SQL查询编写JPA查询(How I can write JPA query for given SQL query)