可视化操作中涉及的代码? [英] Visualizing the code involved in an action?

查看:102
本文介绍了可视化操作中涉及的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力弄清图书馆的工作原理,并希望能够可视化响应用户输入(例如按键或鼠标点击)执行哪些方法和代码行。有没有办法在.NET中执行此操作?

I am trying to figure out how a library works and I would like to be able to visualize which methods and lines of code are executed in response to user input (e.g. a keypress or mouse click). Is there a way to do this in .NET?

推荐答案

微软有一个非常好的免费工具,称为 Pex 。安装完成后,您可以右键单击一个方法并选择运行Pex Exploration。它将分析代码并显示输入以触及方法的每一部分。

There's a wonderful, free tool from Microsoft called Pex. Once installed, you can right-click a method and select "Run Pex Exploration". It will analyze the code and show you inputs to touch every part of the method.

有关更多信息,请参阅 Pex CodeDigger 。以下是其中的一个截图:

For more information, see Pex CodeDigger. Here's a screenshot of it in action:

alt text http://blogs.msdn.com/blogfiles/nikolait/WindowsLiveWriter/SneakPreviewCodeDiggerTheNewPexExperienc_14A2D/DiggerTestTable_thumb.png

这篇关于可视化操作中涉及的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆