微小的快乐功能#1-Visual Studio 2012中的T4模板调试

(UPDATE: See other Tiny Happy Features)

(更新:请参见其他Tiny Happy功能)

At some point soon lots of people are going to start writing these epic blog posts about Visual Studio 2012. They will include LOTS of screenshots (some good and some bad), some small code samples and minimal context. I can't speak for other teams; I can only talk about what we worked on. The <AngleBrackets/> folks in Azure Platform and Tools (ASP.NET, IIS, WCF, EF, Azure much and more) have been putting a lot of work into what I sometimes call "Death by a Thousand Tiny Cuts." It's the little irritants that are as frustrating (or more so) as the big missing features.

在不久的某个时刻,许多人将开始写有关Visual Studio 2012的史诗般的博客文章。它们将包括很多屏幕截图(有些好坏),一些小代码示例和最少的上下文。 我不能代表其他球队; 我只能谈论我们的工作。 Azure平台和工具(ASP.NET,IIS,WCF,EF,Azure等等)中的<AngleBrackets />成员已经为我有时称为“千刀斩死”的内容做了很多工作。 小刺激物与大缺失功能一样令人沮丧(或更多)。

Rather than a giant super post (although I'll do that at some point, I thought I'd showcase some Tiny Happy Features* that I or another passionate member of the team worked on just because it made life better. Some of these features might not be obvious or easily noticed. Actually it'll be better that you notice the absence of a tiny cut than the inclusion of a new shiny drag and drop toy. It's all part of a larger goal to make the experience of making Web Applications in Visual Studio enjoyable.

而不是一个巨大的超级职位(尽管我会在某个时候这样做,但我认为我会展示一些Tiny Happy Features * ,我或团队的另一位热情的成员只是为了让生活变得更好而努力。)可能不那么明显或不容易注意到。实际上,最好不要包含一个小切口,而不是添加一个新的闪亮的拖放玩具,这是实现Web应用程序体验的更大目标的一部分。在Visual Studio中令人愉快。

T4模板调试 (T4 Template Debugging)

I've long said that T4 is one of the best kept "secret" features of Visual Studio. T4 (the Text Template Transformation Toolkit) doesn't have a whole pile of people working on it, but developers like Gareth Jones really care about it and we really like it in the Web team. Lots of our projects use and have used T4 to generate code. In Visual Studio 2012 Gareth worked with Tim Malone so Tim could make a T4 debugger! Be sure to check out the T4 Team Blog.

长期以来,我一直说T4是Visual Studio保留得最好的“秘密”功能之一T4 (文本模板转换工具包)上没有很多人在工作,但是像Gareth Jones这样的开发人员真的很在意它,我们在Web团队中也非常喜欢它。 我们的许多项目都使用T4来生成代码。 Gareth在Visual Studio 2012中与Tim Malone合作,因此Tim可以制作T4调试器! 请务必查看T4团队博客

Sure, T4 fans have always wanted built-in T4 Syntax Highlighting, but in this case, there were already a great T4 SyntaxHighlighting solution or three good options and there was no FREE debugger. Until now.

当然,T4爱好者一直都希望内置T4语法高亮显示,但是在这种情况下,已经有了出色的T4 SyntaxHighlighting解决方案三个不错的选择,而且没有免费的调试器。 到现在。

T4 in Visual Studio 2012 has Debugging!

You can now right-click on a T4 templates and Debug T4 template. I've got a breakpoint there on a line within the T4. My own T4 is syntax highlighted with the Tangible Editor.

现在,您可以右键单击T4模板和Debug T4模板。 我在T4的一条线上有一个断点。 我自己的T4是“有形编辑器”中突出显示的语法。

When I start debugging I can set breakpoints and watches and step through just like any other language.

当我开始调试时,可以像设置其他语言一样设置断点和监视并逐步执行。

Notice here in the Immediate Window I'm looking at this.GenerationEnvironment. I can see the generation AS it happens in this variable.

请注意,在即时窗口中,我正在查看this.GenerationEnvironment。 我可以看到在此变量中发生的生成AS。

If you like T4 and you want them to know, leave a comment below and I'll use your comments to bludgeon convince management that we should continue to invest.

如果您喜欢T4,你想让他们知道,在下面留言,我会用你的意见 棍棒 说服管理层,我们应该继续投资。

* Ya, some features aren't Tiny, but some are refinements and I like saying Tiny Happy Features. Sue me.

*是的,有些功能不是Tiny,但是有些是改进,我喜欢说Tiny Happy Features。 告我。

翻译自: https://www.hanselman.com/blog/tiny-happy-features-1-t4-template-debugging-in-visual-studio-2012

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值