微小程序发朋友圈功能_微小的快乐功能#1-Visual Studio 2012中的T4模板调试

微小程序发朋友圈功能_微小的快乐功能#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解决方案三个不错的选择,并且没有免费的调试器。 到现在。

微小程序发朋友圈功能_微小的快乐功能#1-Visual Studio 2012中的T4模板调试

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是“有形编辑器”中突出显示的语法。

微小程序发朋友圈功能_微小的快乐功能#1-Visual Studio 2012中的T4模板调试

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

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

微小程序发朋友圈功能_微小的快乐功能#1-Visual Studio 2012中的T4模板调试

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。

微小程序发朋友圈功能_微小的快乐功能#1-Visual Studio 2012中的T4模板调试

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。 告我。

关于斯科特 (About Scott)

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

斯科特·汉塞尔曼(Scott Hanselman)是前教授,前金融首席架构师,现在是演讲者,顾问,父亲,糖尿病患者和Microsoft员工。 他是一位失败的单口相声漫画家,一个玉米种植者和一本书的作者。

微小程序发朋友圈功能_微小的快乐功能#1-Visual Studio 2012中的T4模板调试
微小程序发朋友圈功能_微小的快乐功能#1-Visual Studio 2012中的T4模板调试
微小程序发朋友圈功能_微小的快乐功能#1-Visual Studio 2012中的T4模板调试
About   关于 Newsletter 时事通讯
Hosting By 主持人
微小程序发朋友圈功能_微小的快乐功能#1-Visual Studio 2012中的T4模板调试

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

微小程序发朋友圈功能