Visual Studio 的 C# 解释器插件

发布于 2024-09-06 18:50:04 字数 164 浏览 2 评论 0原文

我有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

又怨 2024-09-13 18:50:04

您可以滥用中间窗口来评估事物(在调试模式下)。不过,我建议 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.

你在看孤独的风景 2024-09-13 18:50:04

除了 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...

腹黑女流氓 2024-09-13 18:50:04

我通常使用 LinqPad,但是您尝试过 立即窗口吗? 就个人而言,这种事情对于创建单元测试来说非常有用。

I usually use LinqPad, but have you tried the immediate window? Personally, this kind of thing is great for creating a unit test.

凉薄对峙 2024-09-13 18:50:04

您应该检查的另一个是 Snippet Compiler

One other you should check out is Snippet Compiler

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文