|
-
August 16th, 2007, 10:24 AM
#1
VS Addin. Detecting when Debugging Starts
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...
-
August 16th, 2007, 10:57 AM
#2
Re: VS Addin. Detecting when Debugging Starts
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
Code:
#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
Thanks and Regards
Ravi.Battula
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|