从 Visual Studio 2017 开始调试时,ElementHost 挂起。在没有VS的情况下启动它时没有问题

ElementHost hangs up, when start from Visual Studio 2017 in debug. When start it without VS no problems

Windows Forms with ElementHost 在调试中从 Visual Studio 2017 开始时挂起。在没有 VS 的情况下启动它时没有问题(相同的调试,如随意的 exe)。连空的ElementHost都挂了。程序完全挂了。

此外,在只有带有 ElementHost 的表单的测试项目中没有挂断。 有时 ElementHost 不显示任何内容,有时一切正常约 1 秒。

问题已解决。我在 Debug/Options 中的 Debug/General 中禁用了 "Enable UI Debugging Tools for XAML"...我很感兴趣,为什么它有效?在小型 WinForms 中,任何选项都不会发生此故障