2

I have a rather large Windows Forms application. I'm unfamiliar with its code base and have a hard time finding things with Visual Studio. However, business users can easily point me to the various forms and controls in a running instance of the application. So I'd like to be able to inspect the running GUI and find the metadata (form and control names, control event handler names, etc) by using some kind of tool to inspect it. Much like the developer tools do in a website.


Must have

  • Able to inspect Windows Forms application targeting .NET 3.5 and up;
  • Ability to click standard controls (buttons, labels, textboxes) and forms to see their Name;
  • Runs on Windows Server 2012 and up / Windows 8.1 and up;
  • Gratis;

Should have

  • Minimal performance overhead;
  • Able to see the namespace of inspected controls;
  • All of these abilities, but for custom controls (e.g. from 3rd party libraries);

Would like to have

  • Able to see the relevant source code files of inspected controls;
  • Able to see properties besides Name;
  • Able to see what event handlers are registered for the various events;

Nice to have

  • Able to jump straight to the relevant file/code in Visual Studio having that application's solution opened;
  • Open source.

I've searched for options, finding some Stack Overflow questions (1, 2, 3); however those questions are often very "minimal" (and probably off-topic there), and the answers are equally short, usually nothing more than a "have you tried [somelinkedapp]?". I do see most answers suggesting "Hawkeye", which I'll try in a sec, but still I have to ask:

What tool would you recommend for the above requirements?

  • Note that I ended up using/trying Hawkeye, which worked for my use case. Haven't got enough experience with it yet to write up an answer / know if I'd recommend it though. – Jeroen Feb 16 '16 at 6:10
  • Please give a link to Hawkeye and please come back and post an answer to help others. – Mawg Feb 16 '16 at 15:58
  • I have been very happy with Winspector sourceforge.net/projects/winspector – Mawg Feb 16 '16 at 16:00
3

As free application I'll recommend the Microsoft UI Automation toolset from the Windows SDK.

With UI Inspect you can click an UI element then see its name and a full list of other information, and using Visual UI Automation Verify or AccScope could give you visual representation of the visible elements and maybe a better hierarchy understanding.

It meets these requeriments:

  • Able to inspect Windows Forms application targeting .NET 3.5 and up
  • Ability to click standard controls (buttons, labels, textboxes) and forms
  • Runs on Windows Server 2012 and up / Windows 8.1 and up
  • Gratis
  • Minimal performance overhead
  • All of these abilities, but for custom controls (e.g. from 3rd party libraries)

About the namespaces and element (real)names, I am not a reverse engineering gurú but I think it breaks the meaning and capabilities of UI Inspection and for that kind of detailed deep-view you must need a decompiler tool like the paid .Net Reflector from Red Gate, or the free Simple Assembly Explorer (SAE), and optionally de4dot for those cases where the members of the source-code are obfuscated/protected (like namespaces and member names).

They meets these requeriments:

  • Able to see the namespace of inspected controls
  • Able to see properties besides Name
  • Able to see what event handlers are registered for the various events
  • Able to see the relevant source code files of inspected controls
  • ...to see their Name

    ( of course we are talking about the reconstructed/reflected source-code. )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.