Visual Studio提示和技巧
调试器 ( Debugger )
Hitting F10 to build, run, and attach debugger instead of F5 will automatically break on the first time your own code is being executed. No breakpoints needed.
在您第一次执行自己的代码时,按F10键来构建,运行和附加调试器而不是F5会自动中断。 无需断点。
Reattach to process (Shift+Alt+P) is extremely helpful when you have to attach to the same process again and again.
当您必须一次又一次地附加到同一进程时,重新附加到进程(Shift + Alt + P)会非常有用。
A blue dot in the margin indicates a switch of threads while stepping through debugging.
页边的蓝点表示在调试过程中线程切换。
解 ( Solution )
Improve performance of solution load and reduce visual noise by disabling restore of node expansions in Solution Explorer as well as Reopen documents on solution load.
通过在解决方案资源管理器中禁用节点扩展的还原以及在解决方案负载时重新打开文档来提高解决方案负载的性能并减少视觉噪声。
For fast keyboard navigation, use Ctrl+T to find anything in your solution – files, classes etc.
为了快速进行键盘导航,请使用Ctrl + T在解决方案中查找任何内容–文件,类等。
Assign a keyboard shortcut to perform a “git pull” so you don’t have to use CLI or Team Explorer to ensure your repo is up to date.
分配键盘快捷方式来执行“ git pull”,这样您就不必使用CLI或Team Explorer来确保您的存储库是最新的。
Make Solution Explorer automatically select the current active document, so you never lose track of its location in the project.
使解决方案资源管理器自动选择当前的活动文档,因此您永远不会丢失它在项目中的位置。
编辑 ( Editor )
Easily surround HTML elements with a using Shift+Alt+W. The inserted is selected so you can easily edit it to be any tag you’d like, and the end-tag matches up automatically.
使用Shift + Alt + W轻松围绕HTML元素。 已选择插入项,因此您可以轻松地将其编辑为所需的任何标签,并且结束标签会自动匹配。
Copy any JSON fragment to the clipboard and paste it as strongly typed .NET classes into any C# or VB code file.
将任何JSON片段复制到剪贴板,并将其作为强类型.NET类粘贴到任何C#或VB代码文件中。
You don’t need to write quotation marks around JSON property names, simply type a colon and Visual Studio will insert the quotes automatically.
您无需在JSON属性名称周围写引号,只需键入冒号,Visual Studio就会自动插入引号。
Make IntelliSense and tooltips semi-transparent for the duration you press and hold the Control key.
在按住Control键的时间内,使IntelliSense和工具提示变为半透明。
Instead of retyping ‘(‘ to show parameter info in method signatures, use Ctrl+Shift+Space to display the currently used overload.
不必重新键入'('以在方法签名中显示参数信息,而是使用Ctrl + Shift + Space来显示当前使用的重载。
杂 ( Miscellaneous )
Play a sound when certain events occur within Visual Studio.
在Visual Studio中发生某些事件时播放声音。
Supported from Visual Studio 2010
受Visual Studio 2010支持
Create custom window layouts for specific development scenarios or monitor setups and switch between them easily.
为特定的开发方案创建自定义窗口布局,或监视设置并在它们之间轻松切换。
Specify which Visual Studio components are required for any solution, and Visual Studio will prompt the user to install them if missing. Read more in the blog post Configure Visual Studio across your organization with .vsconfig.
指定任何解决方案都需要哪些Visual Studio组件,如果缺少,Visual Studio会提示用户安装它们。 在博客文章中使用.vsconfig配置整个组织中的Visual Studio ,以了解更多信息 。
扩展名 ( Extensions )
Visual Studio Spell Checker. An editor extension that checks the spelling of comments, strings, and plain text as you type or interactively with a tool window. It can also spell check an entire solution, project, or selected items. Options are available to define multiple languages to spell check against. Visual Studio拼写检查器 。 一个编辑器扩展,可在您键入或与工具窗口交互时检查注释,字符串和纯文本的拼写。 它还可以拼写检查整个解决方案,项目或选定的项目。 选项可用于定义多种语言以进行拼写检查。This was just a few of the thousands of available extensions. To see more extensions, go to the Visual Studio Marketplace.
这只是数千个可用扩展中的几个。 要查看更多扩展,请转到Visual Studio市场 。
在结束时 (In closing)
These were just a few hand-picked tips from the hashtag #vstip on Twitter. There are plenty more to check out. If you have some great tips, please share them using the #vstip hashtag so we can all easily find them.
这些只是Twitter上#vstip标签上的一些精选技巧。 还有更多需要检查的地方。 如果您有一些很棒的提示,请使用#vstip主题标签将其分享,以便我们所有人都可以轻松找到它们。