How to tell if a .NET application was compiled in DEBUG or RELEASE mode?

I blogged this a long time ago, and I don’t know if it still valid or not, but the code is something like… private void testfile(string file) { if(isAssemblyDebugBuild(file)) { MessageBox.Show(String.Format(“{0} seems to be a debug build”,file)); } else { MessageBox.Show(String.Format(“{0} seems to be a release build”,file)); } } private bool isAssemblyDebugBuild(string filename) { return … Read more

Prevent Visual Studio from trying to load symbols for a particular DLL

You can’t do this in a very fine grained fashion but you can disable automatic symbol loading and then manually choose the symbols to load via the Modules window (Debug -> Windows -> Modules). To Disable Automatic Symbol loading Tools -> Options -> Debugging -> Symbols Check “Search the above locations only when symbols are … Read more

What’s the risk of deploying debug symbols (pdb file) in a production environment?

Here is another question to look at: Are there any security issues leaving the PDB debug files on the live servers? And more info on PDB files: PDB Files: What Every Developer Must Know In general, I always include pdb files in my deployments, the gains are too huge to ignore. If you never expose … Read more

How do you extract local variable information (address and type) from a Delphi program or the compiler-generated debug info?

Check if any debugging symbols weren’t in binary. Also possible is using GDB (on Windows a port of it). It would be great if you found a .dbg or .dSYM file. They contain source code, eg. gdb> list foo 56 void foo() 57 { 58 bar(); 59 sighandler_t fnc = signal(SIGHUP, SIG_IGN); 60 raise(SIGHUP); 61 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)