简体   繁体   English

使用调试python发布扩展吗?

[英]Release extensions with debug python?

I am trying to debug a python application ( see previous question ) that is failing inside a multiprocessing fork on windows. 我正在尝试调试在Windows上的多处理fork内失败的python应用程序( 请参阅上一个问题 )。 It would be nice to step though the imp module find_module function, and I have built python (debug and release) from scratch. 最好通过imp模块的find_module函数,并且我从头开始构建了python(调试和发布)。 I run the app with the release build and put debug prints in imp, but I would rather step through the failing code and look at whatever occurs to me as I do so. 我使用发行版版本运行该应用程序,并将调试打印内容放入imp中,但是我宁愿逐步浏览失败的代码,并查看这样做时发生的一切。 The application requires a number of third party extensions and I don't have debug versions. 该应用程序需要许多第三方扩展,并且我没有调试版本。 Is there any way I can use release extensions with the debug python build? 有什么办法可以将版本扩展与调试python版本一起使用? I know I could simply create a "release" python build with symbols and debug information, but I'm feeling lazy Today and would rather use an actual debug build, if I can. 我知道我可以简单地创建一个带有符号和调试信息的“发布” python版本,但是今天我很懒,如果可以的话,我宁愿使用一个实际的调试版本。

Any suggestions? 有什么建议么?

This is not likely to work. 这不太可能。 Debug and release builds can use very different C run-time libraries that won't play nice with each other when you try to use them in the same process (for example, attempting to free some release-allocated memory using the debug runtime may just crash or assert when it doesn't find the extra metadata it's expecting). 调试版本和发布版本可以使用非常不同的C运行时库,当您尝试在同一进程中使用它们时,它们之间的配合不好(例如,尝试使用调试运行时释放某些发布分配的内存可能只是在找不到所需的额外元数据时崩溃或断言)。 To work with release modules, the safest thing is to use a release Python built with symbols. 要使用发布模块,最安全的方法是使用使用符号构建的发布Python。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Windows上调试Python的C扩展 - How to debug C extensions for Python on Windows 寻找调试外部Python Flask扩展的技术 - Looking for techniques to debug external Python Flask Extensions 识别dll是内置调试还是使用python发布 - Identify whether a dll is built in debug or release with python VS Code 中是否有 Python 的调试/发布模式? - Is there debug/release mode for Python in VS Code? 了解python引用计数以调试c-扩展 - understanding python reference counts in order to debug c-extensions Python,从 Python/Blender 的发布版本加载调试模块 - Python, load debug module from release build of Python/Blender C DLL和Python CType-发布/调试中的返回不同 - C DLL and Python CTypes - Different Return in Release / Debug C ++ Swig Python(C ++中的嵌入式Python)可在Release中工作,但不能在Debug中工作 - C++ Swig Python (Embedded Python in C++) works in Release but not in Debug 从 CMake 在 Windows/Visual Studio 中的调试模式下强制链接 Python 发布库 - Force linking against Python release library in debug mode in Windows/Visual Studio from CMake 用于firefox扩展的python? - python for firefox extensions?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM