如何告诉Visual Studio在Break All上不能远离当前文件? [英] How to tell Visual Studio to not navigate away from current file on Break All?

查看:152
本文介绍了如何告诉Visual Studio在Break All上不能远离当前文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法避免Visual Studio在暂停会话时转到另一个文件?

Is there a way to avoid Visual Studio from going to another file when pausing a session?

如果您正在调试其他地方的类,并且调用代码从表单中依次执行ShowDialog(); (或类似),如果您突然暂停应用程序,Visual Studio将切换到该文件(有时是Main()方法)。我想留在我面前的文件中,因为我通常需要添加/删除路标或更改代码,这是令人讨厌的(如果你有太多的打开文件)回到我的位置> 。

If you’re debugging a class somewhere else and the code is called from a form which in turns executes a ShowDialog(); (or similar), if you suddenly pause the application, Visual Studio will switch to the file (which sometimes is the Main() method). I’d like to stay in the file I have in front of me, since I usually need to add/remove waypoints or change code and it’s annoying (if you have too many open files) to go back to the point where i was before the pause.

找不到该选项。

推荐答案

我不确定如何解决您的问题,但也许您可能希望使用以下方法之一很容易返回到您感兴趣的确切点:

I'm not sure exactly how to solve your problem, but perhaps you may want to use one of the following methods for easily returning to the exact point you were interested in:

A。 (从菜单)查看 - >向后导航。我有一个这样的组合,我觉得很容易。请注意,这只适用于您实际使用光标编辑/导航的代码中的位置。

A. (From the Menu) View -> Navigate Backward. I have this bound to a key combination I find easy. Note that this only works positions in the code where you have actually been editing / navigating with the cursor.

B。使用 Ctrl-K,Ctrl-K 组合键添加书签到您想要返回的行。您可以通过书签窗口查看,命名和浏览所有书签。您还可以通过组合键 Ctrl-K,Ctrl-N

B. Add a bookmark to the line you're interested in returning to with the key combination Ctrl-K, Ctrl-K. You can view, name, and navigate to all your bookmarks via the bookmark window. You can also navigate through your bookmarks via the key combination Ctrl-K, Ctrl-N

这篇关于如何告诉Visual Studio在Break All上不能远离当前文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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