可视化参与诉讼的code?code

2023-09-06 10:04:30 作者:无敌软妹噼里哗啦

我试图找出如何图书馆工作,我想是能够想象其中的方法和code线,以响应用户的输入被执行(例如,一个关键的preSS或鼠标点击) 。有没有办法做到这一点。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的探索。这将分析code,告诉你输入触摸方法的每一个部分。

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: