调试视图错误
我正在使用 Windows 7 64X 和 DebugView 4.76.0.0。
日志未显示在 DebugView 上。 我尝试用 Debug.WriteLine("Text"); 写入日志却什么也看不见。 我可以看到它已连接到我的计算机。
当我使用 DebugView V4.64.0.0 时,我收到错误消息,它已连接到 DebugView 的其他实例,但我检查过,没有任何其他实例。
我可以做什么或检查什么?
顺便提一句, 我可以在输出窗口中看到日志。
问候, 埃坦·加贝
I'm working with Windows 7 64X and DebugView 4.76.0.0.
Logs isn't shown on DebugView.
I trying to write logs with Debug.WriteLine("Text"); and see nothing.
I can see that It's connected to my computer.
When I use DebugView V4.64.0.0 I get error message that it is already connected to other instance of DebugView, but I've checked and there isn't any other.
What can I do or check ?
BTW,
I can see the log in the output window.
Regards,
Eitan Gabay
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要检查是否确实有另一个 debugview 实例正在运行,请打开任务管理器,然后选择“显示所有用户的进程”。确保只有一个调试视图正在运行。
通过 Visual Studio 进行调试时,Visual Studio 实际上与 DebugView 进行竞争。如果您要编译可执行文件并在外部运行它,您将看到 DebugView 中打印的日志消息。
人们有时会忽略的另一件事是,如果程序是为发布而编译的,则排除 Debug.Write 语句。但是,如果使用 Trace.Write 而不是 Debug.Write,您仍然可以写入跟踪。
您打印的所有消息都会转到名为 DB_WINBUFFER 链接 的内存共享部分。重要的是要认识到每个 Windows 会话都有自己的“DB_WINBUFFER”。每当 DebugView 检测到您不在会话 0 中时,它将提供“捕获全局”选项。如果您的程序作为 Windows 服务运行,那么您将需要启用全局捕获(除非您已经处于会话 0 中,这仅在 Windows XP 中可行)。
To check if you really have another instance of debugview running, open up your task manager, and select "show processes from all users". Make sure that only one debugview is running.
When debugging through Visual Studio, Visual Studio actually competes against DebugView. If you were to compile your executable, and run it externally, you will see your log messages printed in DebugView.
One other thing that people sometimes overlook is that Debug.Write statements are excluded if a program is compiled for Release. However, you can still write to the trace if you use Trace.Write instead of Debug.Write.
All messages that you print go to a shared section of memory called DB_WINBUFFER link. It is important to realize that each windows session has its own "DB_WINBUFFER". Whenever DebugView detects that you are not in session 0, it will provide a "Capture Global" option. If your program is running as a windows service, then you will need to enable capture global (unless you are already in Session 0, which is only possible in Windows XP).