C# 数据提示(在调试模式下将鼠标悬停在变量上)在 Visual Studio 2012/Win 7 64 位中不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19108801/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Datatips (mouse hover over variables in debug mode) not working in Visual Studio 2012 / Win 7 64bit
提问by pilcrowpipe
When I hover my mouse over a variable when debugging a C# app in Visual Studio nothing popups. I expect to see the value of the variable (aka datatips). I'm running Visual Studio 2012 Ultimate (trial edition) on Windows 7 64bit. Does anyone know what may prevent them from showing?
在 Visual Studio 中调试 C# 应用程序时,当我将鼠标悬停在变量上时,没有任何弹出窗口。我希望看到变量的值(又名数据提示)。我在 Windows 7 64 位上运行 Visual Studio 2012 Ultimate(试用版)。有谁知道什么可能阻止他们显示?
Things I've tried to no avail: - Reinstall VS - Search for an enable/disable setting but there doesn't seem to be one
我试过无济于事的事情: - 重新安装 VS - 搜索启用/禁用设置,但似乎没有
I can see the datatips correctly with the same C# project on Windows 8/64bit with the same version of Visual Studio.
我可以使用相同版本的 Visual Studio 在 Windows 8/64 位上使用相同的 C# 项目正确查看数据提示。
回答by MikroDel
I have found this solutions:
我找到了这个解决方案:
reinstall Visual Studio as adivced here, but you have already tried it
Open your VS->Tools->Import and Export Settings Wizard->Reset all settings->No, just reset settings, overwriting my current settings-> Choose a Default Collection of Settings from MSDN Forum: Debugging - hover watch has stopped working
在这里重新安装 Visual Studio ,但您已经尝试过了
打开您的 VS-> 工具-> 导入和导出设置向导-> 重置所有设置-> 不,只需重置设置,覆盖我当前的设置-> 从MSDN 论坛选择默认设置集合:调试 - 悬停手表已停止工作
Updated:
更新:
maybe you have Release build configuration
set Code Optimization property to Disabled under Project property windows
也许你有发布构建配置
在项目属性窗口下将代码优化属性设置为禁用
as adviced in similiar question on SO
正如在关于 SO 的类似问题中所建议的那样
回答by Daren
I had this same problem. My project had somehow gone into Release mode, so I changed it back to Debug mode via Build|Configuration Manager and it was working again, the datatips reappeared.
我有同样的问题。我的项目不知何故进入了发布模式,所以我通过构建|配置管理器将它改回调试模式,它再次工作,数据提示重新出现。
回答by Dan Stevens
I had this problem so I deleted all the *.suo
and *.user
files I could find in the solution directory and that seemed to fix it.
我遇到了这个问题,所以我删除了在解决方案目录中可以找到的所有*.suo
和*.user
文件,这似乎解决了它。
回答by Bryan Zambrano
the same happened to me but only with C#, active mode administered compatibility (Managed Compatibility Mode) and it worked well, then I wanted to modify the code while had debugged and came out a motioning message "compatibility mode administered is not supports edit and continue" then turn it off again, under native support is (Use the legacy C# and VB expression evaluators) enable this option and you can see the value of objects and edit code debugging.
同样的情况发生在我身上,但仅适用于 C#,主动模式管理的兼容性(托管兼容模式)并且它运行良好,然后我想在调试时修改代码并发出一个动人的消息“管理的兼容模式不支持编辑并继续” 然后再次关闭它,在本机支持下(使用旧的 C# 和 VB 表达式评估器)启用此选项,您可以查看对象的值和编辑代码调试。
Greetings.
你好。
回答by droschmisch
THis helped me: you need to open in VS Tools | Options | Debugger | General and enable the flag [Use Managed Compatibility Mode].
这对我有帮助:你需要在 VS Tools 中打开 | 选项 | 调试器 | 常规并启用标志[使用托管兼容模式]。
回答by Obraine
回答by Mohsen Karbassi
This 3 combinations solved it for me.
- Make sure you are in Debug mode
- Uncheck/Disable Use the legacy C#,VB.NET evaluator (Tools->Options->Debugger)
- Make sure Enable Just My Code is checked.
这 3 种组合为我解决了这个问题。
- 确保您处于调试模式
- 取消选中/禁用使用旧版 C#、VB.NET 评估器(工具->选项->调试器)
-确保选中仅启用我的代码。
回答by Stephen Himes
Using remote debugging on another machine makes it more challenging.
This thread talks about RPC Server being unavailable when using "Use Managed Compatibility Mode", which makes remote debug impossible with Managed Compatibility Mode
该线程讨论了使用“使用托管兼容模式”时 RPC 服务器不可用,这使得使用托管兼容模式无法进行远程调试
Remote Debugging not working. "Unable to attach to process. The RPC server is not available."
远程调试不起作用。“无法附加到进程。RPC 服务器不可用。”
Native compatibility had the same effect.
本机兼容性具有相同的效果。
It was only "Use legacy C# and VB expression evaluators" that allowed hover over variables AND remote debugging in my case.
在我的例子中,只有“使用传统的 C# 和 VB 表达式评估器”允许将鼠标悬停在变量上并进行远程调试。
回答by rafiquenazir
For me, this worked on Microsoft Visual Studio Community 2017, Version 15.9.9:
对我来说,这适用于 Microsoft Visual Studio Community 2017,版本 15.9.9:
If you are facing this issue simply uninstall the current version and reinstall VS. After installing and running debugging mode first time, please choose "Disable Just My code and Continue" selection,it should work.(as shown in the attached screen shot).
If you do not want to uninstall and then re-install visual studio,then try these settings on the existing VS installation:
如果您遇到此问题,只需卸载当前版本并重新安装 VS。第一次安装并运行调试模式后,请选择“禁用仅我的代码并继续”选项,它应该可以工作。(如所附屏幕截图所示)。
如果您不想卸载然后重新安装 Visual Studio,请在现有 VS 安装上尝试这些设置:
Go to: Options => Import and Export Settings ==>Reset All Settings==>No Just reset settings,overwrite my current settings =>Finish
转到:选项 => 导入和导出设置 ==> 重置所有设置 ==> 否 只需重置设置,覆盖我当前的设置 => 完成
after this simply start debugging and choose "Disable Just My code and Continue" option.
之后只需开始调试并选择“禁用仅我的代码并继续”选项。
3.If you are still having problem,please also make sure by going to project =>properties ==> Configurations that you have configurations set to debug(sometimes configurations are set to release)
3.如果你仍然有问题,也请通过去项目=>属性==>配置确保你有配置调试(有时配置被设置为发布)
- Go to Tools=>options =>Debugging ==> General ==> select Suppress JIT optimization on module load
- 转到工具=> 选项 => 调试 ==> 常规 ==> 选择在模块加载时抑制 JIT 优化
回答by liteflier
Deleting the .vs directory and restarting worked for me.
删除 .vs 目录并重新启动对我有用。