Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Corneliu Tusnea has Released Hawkeye as Open Source

Corneliu Tusnea has Released Hawkeye as Open Source

This item in japanese

Corneliu Tusnea, author of the debugging tool Hawkeye, has released the free version as an open source project on CodePlex.

Hawkeye is a debugging tool that can attach to any running .NET process and manipulate its objects. Hawkeye really shines in areas where other debuggers like Visual Studio fall flat. By merely dragging the crosshair onto a running form, you can see all the properties and events for the given control. You do not have to know the corresponding variable names or even the process; it is all done automatically for you.

Recently we were able to talk with Corneliu about Hawkeye.

What prompted you to build Hawkeye in the first place?

The need for a tool to help me better debug my WinForms applications. At the time when I first started to write Hawkeye (at that time it was named Runtime Object Editor) I was working on a large Windows Forms application. We had lots of runtime-generated UI and controls generated based on configuration Xml and it was extremely hard to figure out why a control was working or not. The tool was very basic at that time. All you could see and edit were the standard properties that you would see in the designer.

I then released the tool on CodeProject and had some great feedback.

For me it was a great tool at that time and help me a lot in my work.

About a year later, I’ve added support for all properties and method display and invocation. Then the remaining features came most as an exercise to see how many things you can do with reflection: displaying events and event handlers, calling event handlers, adding new handlers, displaying the fields of an object and the application information. I didn’t really need any of those anymore as I moved on from developing Windows Forms application but the exercise was good for me to learn reflection code emitting and more about the CLR.

In the autumn of 2006, while talking with Adam Cogan [from SSW] he told me I have to find a better name for the tool. Runtime Object Editor sounded odd and not representative. He came with “Bullseye” from the look of the target button at the top-left corner of the tool. I later changed it to “Hawkeye” to represent the great visibility the tool offers you inside the code of another application.

Recently you released Hawkeye to CodePlex. Was this a hard decision for you?

Yes and no. I’ve originally released the several versions and the source code on CodeProject.

However CodeProject is not collaborative so people could not participate in developing Hawkeye which stopped the tool from progressing. I had no time to take care of it anymore.

I was getting lots of requests for new functionality, for changes to allow testing or better debugging and I had no time to fix it. I was feeling bad of letting people down by not adding the requested features.

Finally after several more requests to add functionality I decided is in Hawkeye’s best interest to release it again and let people participate and add new code.

I recall that about a year ago Hawkeye was being released as both a free version and a more powerful paid version. Does CodePlex contain both versions or are you still selling the professional edition?

CodePlex code only contains the free version. However, as specified in the licence of Hawkeye, the paid version only offers you two extra functionalities that 99% of developers don’t really need.

They are more of “cool” and “exciting” then truly useful.

I noticed that you used a mixture of C++ and C#. Can you discuss a little about why you chose to go that route?

As you noticed most of the code is in C#. The C++ part is only the process injection part that you can’t really do it in C#. Writing it fully in C++ would have been overkill.

I think it’s mostly about using the right tools for the right job.

Corneliu Tusnea is a senior consultant at Readify and is currently working in Microsoft SDC as dev lead. He has a background writing real-time trading platforms for different markets from EuroNext and Xetra in Europe to Tokyo Stock Exchange, TOCOM, Osaka, NASDAQ and more.


Rate this Article