An Iron Python implemtation of this: http://chillijam.co.uk/2006/05/04/determine-if-an-assembly-is-a-debug-or-release-build/
import System | |
def is_assembly_debug_build(filename): | |
"""Returns true if filename appears to have been built in debug mode""" | |
result = False | |
dll = System.Reflection.Assembly.LoadFile(filename) | |
customAttribs = dll.GetCustomAttributes(False) | |
for att in customAttribs: | |
if att.GetType() == System.Type.GetType("System.Diagnostics.DebuggableAttribute"): | |
result = att.IsJITTrackingEnabled | |
return result | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment