... about Brad

Monday, July 26, 2004

Debugging your .NET components

There are two options for your .NET components.  You can debug in design-time mode or in run-time mode. 

 

To debug in design-time mode you will start with two instances of Visual Studio.  The first will have your custom component and the second will have your custom code that tests the component.  Then do the following:

a.     Click on the Debug menu in Visual Studio containing your component code and select the Process menu item.

b.     When the Available Processes dialog opens find and select the devenv.exe process with the title of your Visual Studio project containing the test code.

c.     Click on the Attach button.

d.     When the Attach to Process dialog appears click the checkbox next to the Common Language Runtime and hit the OK button.  Click on the Close button on the Process dialog box.

e.     Place a breakpoint on the appropriate method in your component code.

f.      Go back to the instance of Visual Studio containing your test code and open it in the designer.

g.     From this point you can either click on the component itself or if your component exposes properties, you can click on the property in the property page and you will enter break mode and be placed where you applied your breakpoint.

 

To debug in run-time mode we actually do this two ways.  The first is simple and familiar.  Add the test project to the solution of the component project and debug.  The second is to keep the projects separate, for whatever reasons you may have. We will follow almost the same steps as we did during design-time mode except that we will attach to the aspnet_wp.exe process instead.  In addition, when debugging in run-time mode we only need one instance of Visual Studio which contains your custom code. To setup debugging follow these steps:

    1. Open the webform that will be running your component in IE.
    2. Click on the Debug menu is Visual Studio and select the Process menu item.
    3. When the Available Processes dialog opens find and select the aspnet_wp.exe process.
    4. Click on the Attach button.
    5. When the Attach to Process dialog appears click the checkbox next to the Common Language Runtime and hit the OK button.  Click on the Close button on the Process dialog box.
    6. Place a breakpoint on the appropriate method in your component code.  
    7. Submit a postback in order to invoke this component.
    8. Your project will enter break mode and you will be placed where you applied your breakpoint.

Sunday, July 25, 2004

What Kinds of Cars Do Microsofties Drive?

Marquee de Sells: News

I can't believe Chris actually posted it!! I just said it would be a cool idea if the Microsoft people told us what sort of cars they drive .... you know, show us the Human Side of Microsoft.

I Love it! :-)

Friday, July 23, 2004

Welcome to Gmail

Welcome to Gmail

I just want one!!

What can I say ... the motto works well for HSV too!

Thursday, July 22, 2004

CodeSmith - FREEWARE template-based code generator with ASP.NET style syntax

CodeSmith - FREEWARE template-based code generator with ASP.NET style syntax

Very cool tool. Helps me generate (and regenerate) my DAL in seconds!

Windows vs Linux: Cat amongst the pidgeons

This should really get a rise out of some people!

http://www.microsoft.com/mscorp/facts/default.asp

FxCop

So today I found FxCop. Man is it good!! Apply a bunch of rules to you code and see how well you did..... saves walking though all the new code and doing boring stuff like checking against naming conventions manually!