我有这个问题一直让我很痛苦,然后一些。 基本上我的Debug.WriteLine有一点工作,然后神奇地停止输出。调试器仍然工作,因为我可以放置一个断点,它会断开,我可以跳过Debug.WriteLine并观察它不输出。
I have this problem that has been giving me grief for most of the day and then some. Basically my Debug.WriteLine works for a bit, and then magically stops giving output. The debugger is still working because I can put a breakpoint on the line, and it will break, and I can step over the Debug.WriteLine and watch it not output.
现在我已经检查了我能想到的一切。我已经尝试过各种帖子,如
Now I have checked everything I can think of. I have tried things from various posts such as
Debug.Writeline不打印任何内容
Debug.Writeline停止工作
Visual Studio 2010突然停止显示Debug输出
但没有任何工作。澄清
- 我正在使用vs2010 pro sp1。
- 项目正在使用4框架
- 我有调试常量集。
- 调试器仍然附加,因为我可以设置断点并被击中。
- 这两个项目都被设置为在任何CPU下构建(我尝试使用X86和它没有帮助)
- 我正在Windows 7 x64上运行
- I am using vs2010 pro sp1.
- The projects are using the 4 framework.
- I have the Debug Constants Set.
- The Debugger is still attached as I can set breakpoints and they are hit.
- Both projects are set to build under "Any CPU" (I tried with both as X86 and it didnt help)
- I am running on Windows 7 x64
在遵循所有建议之后,我没有修复。上述帖子都没有被实际回答。
And after following all the suggestions, I dont have a fix. None of those Posts above were actually answered.
那么这个问题怎么解决?
So just how does one fix this ?
我以为我将创建一个单独的解决方案来重现这个问题。
I thought I would create a seperate solution to reproduce this problem.
您可以下载我的解决方案,再次出现此错误 drive.google/uc?export=download&confirm=&id=0B0SLafLeQj5GOGxORThMWWhYV28
You can download my solution that reproduces the bug here drive.google/uc?export=download&confirm=&id=0B0SLafLeQj5GOGxORThMWWhYV28
所以我做了2个Windows应用程序,并将它们设置为同时启动。在每个应用程序中,我开始一个线程,在线程我做一个Debug.WriteLine
So I made 2 windows apps, and set them to both start at the same time. In each app I start a thread, and in the Thread I do a Debug.WriteLine
似乎有一些死锁,并停止写输出。这似乎是Visual Studio中的一个错误,我非常惊讶。我必须相信有两个线程同时进行Debug.WriteLine的项目是不可能的吗?
It seems to get some sort of deadlock and stop writing the output. This appears to be a bug in Visual Studio, which I am highly surprised at. Must I believe that it is impossible to have 2 projects with threads doing Debug.WriteLine at the same time ?
再次,我正在需要一种解决方法这个还是得到Debug Output。 哦,我也尝试过将输出重定向到立即窗口的选项,没有成功。
Once again, I am in deperate need of a way to fix this and still get Debug Output. Oh, and I have also tried the option of redirecting output to the immediate window with no success either.
推荐答案验证输出窗口的上下文菜单是否已选中程序输出。我的调试语句没有跟踪。即使我没有取消选中该选项,这是未经检查的。检查它为我修复。
Verify that the output window's context menu has "Program Output" checked. My debug statements were not tracing. This was unchecked even though I had not unchecked the option. Checking it fixed it for me.
更多推荐
vs2010 Debug.WriteLine停止工作
发布评论