调试工具DebugView for Windows (Dbgview.exe)

DebugView是一款能捕获本地或网络中通过TCP/IP可达计算机的调试输出的应用。它支持Win32的OutputDebugString和内核模式的DbgPrint。在Windows 2000/XP等系统上,需要管理员权限才能查看内核模式的调试输出。只需运行dbgview.exe即可开始捕获调试信息,提供清空窗口、保存数据、搜索输出等功能。DEBUG_PRINT函数示例用于将程序运行信息输出到DbgView。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Introduction

DebugView is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don't need a debugger to catch the debug output your applications or device drivers generate, nor do you need to modify your applications or drivers to use non-standard debug output APIs.

DebugView Capture

Under Windows 2000, XP, Server 2003 and Vista DebugView will capture:

  • Win32 OutputDebugString
  • Kernel-mode DbgPrint
  • All kernel-mode variants of DbgPrint implemented in Windows XP and Server 2003

DebugView also extracts kernel-mode debug output generated before a crash from Window's 2000/XP crash dump files ifDebugView was capturing at the time of the crash.

Installation and Use

Simply execute the DebugView program file (dbgview.exe) andDebugView will immediately start capturing debug output. Note that if you run DebugView on Windows 2000/XP you must have administrative privilege to view kernel-mode debug output. Menus, hot-keys, or toolbar buttons can be used to clear the window, save the monitored data to a file, search output, change the window font, and more. The on-line help describes all of DebugView 's features.

Windows 中输出到DbgView中的函数实现:

在进行Windows开发中,大家经常需要将自己程序的运行时信息输出到一个调试窗口中,让系统的调试着可以随时监控程序的实际运行状态,如下的函 数可以将程序运行时数据输出到DbgView中(DbgView由Sysinternals开发,该公司已被微软收购),并且调用工具直接查看输出值;

void DEBUG_PRINT(IN TCHAR *format, ...)
{
va_list   argList;
TCHAR   szFormat[256], szContent[1024];    //maximum buffer is 1K bytes
_stprintf(szFormat, TEXT(" %s"), format);
va_start(argList, format);
_vsnwprintf(szContent, 1024, szFormat, argList);
va_end(argList);
lstrcat(szContent, L"/n");
OutputDebugString(szContent);
}

下载地址http://download.sysinternals.com/Files/DebugView.zip

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值