Visual Studio中“编辑"和“调试"的单一布局 [英] Single layout for 'edit' and 'debug' in Visual Studio

查看:104
本文介绍了Visual Studio中“编辑"和“调试"的单一布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2008中,开始调试"将Visual Studio切换到其他布局.如何强制Visual Studio始终使用单个布局?

In Visual Studio 2008, 'Start Debugging' switches Visual Studio to a different layout. How can I force Visual Studio to use a single layout at all times?

我可以尝试尽可能以普通模式和调试"模式布置窗口.但是,i)Visual Studio仍会进行可见的重绘,并且ii)我必须手动保持布局同步.

I could attempt to lay out my windows in both normal and 'Debug' modes as similarly as possible. However, i) Visual Studio will still do a visible redraw, and ii) I have to keep the layouts in sync manually.

更新:似乎正确的术语是设计视图"和调试视图".根据窗口布局:四种模式目前没有办法告诉Visual Studio对所有模式使用一种状态."这是真的吗?

Update: It seems the correct terms are 'Design View' and 'Debugging View'. According to Window Layouts: The Four Modes 'There is no way to tell Visual Studio to use one state for all modes at this time.' Is this really true?

推荐答案

否,这是不可能的. 网站您发现确实是准确的:

No, this is not possible. The website you found is indeed accurate:

Visual Studio中有四种不同的窗口布局模式:

There are four different window layout modes in Visual Studio:

  • 设计视图-这是启动Visual Studio时看到的视图.这就是大多数人所说的正常"视图.
  • 调试视图-这是您进入调试模式(如单步执行代码时)所获得的视图
  • 全屏-转到视图"->全屏"时获得的视图( Shift + Alt + Enter ).
  • 文件视图-在DevEnv.eve中打开文件时可获得的鲜为人知的视图
  • Design View - this is the one you see when you start up Visual Studio. It's what most people refer to as the "normal" view.
  • Debugging View - this is the view that you get when you enter Debug Mode like when you are stepping through your code
  • Full Screen - the view you get when you go to View -> Full Screen (Shift + Alt + Enter).
  • File View - the lesser known view you can get when you open up a file in DevEnv.eve

这里要记住的是,对于每种状态,工具窗口和命令栏自定义项都分别保存.目前尚无法告诉Visual Studio在所有模式下使用一种状态.此外,当您以任何状态关闭Visual Studio时,将保存所有四个状态.

The thing to remember here is that, both, your tool windows and your command bar customizations are saved separately for each state. There is no way to tell Visual Studio to use one state for all modes at this time. Additionally, when you shut down Visual Studio in any state, all four states are saved.

对于所有四种模式都使用相同的窗口布局,这很奇怪.在设计时使用的相同窗口在调试期间几乎没有用,反之亦然.
例如,在调试视图"中,我隐藏了工具箱",文档大纲"和属性管理器"窗口.然后,我添加了非常有用的调用堆栈",自动",本地",进程",模块"和断点"窗口.在设计模式下,后一个窗格对我都不会有任何帮助,因此我不希望它们占用屏幕空间.但是它们在调试模式下是无价之宝,所以我希望它们显示出来.我还根据其相对的重要性(例如属性"窗口),以两种不同的模式调整窗口的大小.

It's very strange that you would want to use the same window layout for all four modes. The same windows that are useful at design time are hardly ever useful during debugging, and vice versa.
For example, in Debugging View, I hide the Toolbox, Document Outline, and Property Manager windows. Then, I add the immensely useful Call Stack, Autos, Locals, Processes, Modules, and Breakpoints windows. None of the latter panes would be remotely useful to me in design mode, so I don't want them taking up screen space. But they're invaluable in debug mode, so I want them to show up. I also resize windows in the two different modes, based on their relative importance (such as the Properties window).

如果您仍然真的认为两个视图应该具有相同的窗口布局,则最好的办法是手动重新排列窗口,以在两种模式下实现相同的布局.我还建议导出您的窗口布局"设置(工具"->导入和导出设置"),以便在发生灾难时可以恢复到新副本.我保留的设置文件包含用于单监视器(笔记本电脑),双监视器和三监视器的首选窗口布局设置.

If you really still think that the two views should have the same window layout, the best you can do is rearrange the windows manually to achieve the same layout in both modes. I also recommend exporting your Window Layout settings (Tools -> Import and Export Settings) so that you have a fresh copy to revert back to in the case of disaster. I keep settings files containing my preferred window layout settings for single monitor (laptop), dual monitor, and triple monitor configurations.

这篇关于Visual Studio中“编辑"和“调试"的单一布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆