简体   繁体   English

Visual Studio中的上下文帮助

[英]Context help in Visual Studio

Is there a way to change the context sensitive help in Visual Studio so that it will only search against the text under the caret instead of a complilation error in your code? 有没有一种方法可以更改Visual Studio中的上下文相关帮助,使其仅针对插入符号下的文本而不是代码中的编译错误进行搜索?

More info: After you compile and receive a compilation error(underlined), placing the caret within the underlined text and pressing F1 will take you to the Compliation error page instead of the help for the function under the caret. 更多信息:编译并收到编译错误(带下划线)后,将插入符号置于带下划线的文本中并按F1键,将带您进入Compliation错误页面,而不是插入符号下方的功能帮助。 Can this behavior be changed to always go to the method/keyword help? 可以将这种行为更改为始终访问方法/关键字帮助吗?

Language: C# 语言:C#

The only solution I've found is to fix the compile error ;-) 我发现的唯一解决方案是修复编译错误;-)

A workaround is to use the 'Dynamic Help' window (from the help menu, or CTRL-F1, D), the compile error is top of the list but the usual item will be listed next. 一种解决方法是使用“动态帮助”窗口 (从帮助菜单或CTRL-F1,D),编译错误位于列表的顶部,但通常的项目将在下面列出。

For those that don't understand the question, here's a trivial, unrealistic example: 对于那些不了解这个问题的人,这是一个琐碎,不现实的示例:

int myInt = new int(3);

As soon as you move off the line, the 'new int(3);' 下线后,立即输入“ new int(3);”。 bit is underlined in red, but if you select the second 'int' and press F1, you get help on declaring integers. 该位用红色下划线表示,但是如果选择第二个“ int”并按F1,则可以获取有关声明整数的帮助。

However if you compile it, the offending section is underlined with a wiggly blue line and selecting 'int' and pressing F1 takes you to help on the compile error. 但是,如果您对其进行编译,那么在令人讨厌的部分会用蓝色的摆动线加下划线,然后选择“ int”并按F1键可帮助您解决编译错误。 It's not just a case of the focus moving to the Error List window. 这不仅仅是焦点转移到“错误列表”窗口的情况。

If I remember, after you compile, the default selected window is the message (error list) one. 如果我记得,在编译之后,默认选择的窗口是消息(错误列表)之一。 If you hit F1 at this point, you will get help on the error message. 如果此时单击F1,您将获得有关错误消息的帮助。 But if you select the code window, you will get the help on the selected text. 但是,如果选择代码窗口,则将获得有关所选文本的帮助。

Is this the behavior your are experiencing??? 这是您正在经历的行为吗???

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM