Visual Studio 的 C# 解释器插件
我有 lisp 背景,在编码时我可以在命令行中输入代码片段,以确保我第一次就得到一小块正确的代码。它非常适合测试字符串格式、简单的数学调用等,而无需重新编译整个项目来测试小的更改。
Visual Studio 2010 中是否有功能或插件可以获得此类功能,例如在您实际未执行程序时运行的监视窗口?
I come from a lisp background where I could type in snippets to the command line while coding, to make sure I get a small chunk of code correct the first time. Its great for testing string formatting, simple math calls, etc without having to recompile a whole project to test small changes.
Is there a feature or add-in in visual studio 2010 to get this type of functionality, say like a watch window that runs when you aren't actually executing the program?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以滥用中间窗口来评估事物(在调试模式下)。不过,我建议 LinqPad 它具有基本的即时代码执行功能。
You can abuse the Intermediate window to evaluate things (in debug mode). However, i'd suggest LinqPad it has basic code execution on the fly.
除了 Aren 提到的 LinqPad 之外,您可能还想看看 Mono 的 CsharpRepl。
我不知道其中任何一个是否有可用的 Visual Studio 插件,但这是一个有趣的想法......
As well as LinqPad mentioned by Aren, you might want to look at Mono's CsharpRepl.
I don't know if either of these have Visual Studio add-ins available, but it's an interesting thought...
我通常使用 LinqPad,但是您尝试过 立即窗口吗? 就个人而言,这种事情对于创建单元测试来说非常有用。
I usually use LinqPad, but have you tried the immediate window? Personally, this kind of thing is great for creating a unit test.
您应该检查的另一个是 Snippet Compiler
One other you should check out is Snippet Compiler