Is there a way to detect when a user starts to debug a project and if so, how do you know what the debugging assembly is. I want to display some information to the programmer when they begin debugging...
Printable View
Is there a way to detect when a user starts to debug a project and if so, how do you know what the debugging assembly is. I want to display some information to the programmer when they begin debugging...
HI
If I understand properly, This is the solution
first check DEBUG in project properties. This part of code will only run in debug mode
Thanks and RegardsCode:#if DEBUG
Assembly a = Assembly.LoadFrom ( assemblyName ) ;
object[] attributes = a.GetCustomAttributes( true ) ;
if ( attributes.Length > 0 ) {
Console.WriteLine ( "Assembly attributes for '{0}'..." , assemblyName ) ;
foreach ( object o in attributes )
Console.WriteLine ( " {0}" , o.ToString ( ) ) ;
#end if
Ravi.Battula