VS2010和WPF缓慢调试问题 [英] VS2010 and WPF slow debug issues
问题描述
大家好,
im(和很多其他人一样)在vs2010中做我的第一步。
im (like a lot of other people) doing my first steps in vs2010.
其中一个我刚刚发现的让我烦恼的是,每当我尝试调试WPF应用程序时,ide都会减慢,因此从一个语句到另一个语句的每次移动都会导致10秒。 (!)等待。
one of the things i just found which really annoys me is that each time i try to debug a WPF application the ide slows down so each movement from one statement to the other results in 10 sec. (!) waiting.
我该怎么办?有一个很好的解决方案(除了不使用WPF :):
what can i do ? is there a nice solution (besides not using WPF:)
adiel。
推荐答案
我我认为我在同一条船上,但我在调试和发布模式下都尝试了一个非常基本的WPF 4应用程序。
I think I'm in the same boat, but I tried a very basic WPF 4 app in both Debug and Release Mode.
这是XAML。 Grid是Window中的主面板。
Here is the XAML. Grid is main panel in Window.
<Grid>
<StackPanel Margin="0">
<ComboBox x:Name="cmbTest" />
<Button x:Name="btnTest"
Click="btnTest_Click"
Content="Test"/>
</StackPanel>
</Grid>
以下是按钮点击的代码。
Here is the code for button click.
List<string> lstStrings = new List<string>();
lstStrings.Add("asdf");
lstStrings.Add("fdfdfd");
lstStrings.Add("rereree");
lstStrings.Add("bvbv");
lstStrings.Add("jhjhjhjh");
lstStrings.Add("oioioioio");
lstStrings.Add("vvcvcvcvc");
lstStrings.Add("rererwerew");
lstStrings.Add("mnmnmnmn");
lstStrings.Add("ar rasraser es");
cmbTest.ItemsSource = lstStrings;
单击按钮然后单击下拉列表后,响应速度非常慢。 显示数据需要几秒钟。
After I click the button and then click the dropdown, it is VERY slow to respond. It takes several seconds to display the data.
在尝试使用此应用程序之前,我在另一个应用程序中看到了同样的事情。 它最终会抛出ContextSwitchDeadlock异常。 我发现一个博客说禁用,但没有帮助。
I saw this same thing in another app before trying this one. It would eventually throw a ContextSwitchDeadlock exception. I came across a blog that says to disable, but did not help.
感谢任何帮助。 提前致谢。
Any help is appreciated. Thanks in advance.
这篇关于VS2010和WPF缓慢调试问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!