WinDbg Command-Line Options

2023-11-13

First-time users of WinDbg should begin with the Debugger Operation section.

The WinDbg command line uses the following syntax:

 

windbg [ -server ServerTransport | -remote ClientTransport ] [-lsrcpath ]
   [ -premote SmartClientTransport ] [-?] [-ee {masm|c++}] 
   [-clines lines] [-b] [-d] [-aExtension] [-e Event] 
   [-failinc] [-g] [-G] [-hd] [-j] [-n] [-noshell] [-o] 
   [-Q | -QY] [-QS | -QSY] [-robp] [-secure] [-ses] [-sdce] 
   [-sicv] [-sins] [-snc] [-snul] [-sup] [-sflags 0xNumber] 
   [-T Title] [-v] [-log{o|a} LogFile] [-noinh] 
   [-i ImagePath] [-y SymbolPath] [-srcpath SourcePath] 
   [-k [ConnectType] | -kl | -kx ExdiOptions] [-c "command"] 
   [-pb] [-pd] [-pe] [-pr] [-pt Seconds] [-pv]
   [-W Workspace] [-WF Filename] [-WX] [-zp PageFile] 
   [ -p PID | -pn Name | -psn ServiceName | -z DumpFile | executable ] 

windbg -I[S] 

windbg -IU KeyString

windbg -IA[S] 



 

Descriptions of the WinDbg command-line options follow. All command-line options are case-sensitive except for -j. The initial hyphen can be replaced with a forward-slash (/).

If the -remote or -server option is used, it must appear before any other options on the command line. If an executable is specified, it must appear last on the command line; any text after the executable name is passed to the executable program as its own command-line parameters.

Parameters

-b -k com:port=\\.\pipe\com_xp,baud=11520,pipe
-server ServerTransport
Creates a debugging server that can be accessed by other debuggers. For an explanation of the possible ServerTransport values, see Activating a Debugging Server. When this parameter is used, it must be the first parameters on the command line.
-remote ClientTransport
Creates a debugging client, and connects to a debugging server that is already running. For an explanation of the possible ClientTransport values, see Activating a Debugging Client. When this parameter is used, it must be the first parameters on the command line.
-premote SmartClientTransport
Creates a smart client, and connects to a process server that is already running. For an explanation of the possible SmartClientTransport values, see Activating a Smart Client.
-a Extension
Sets the default extension DLL. The default is kdextx86.dll or kdexts.dll. There must be no space after the "a", and the .dll file name extension must not be included. For details, and other methods of setting this default, see Loading Debugger Extension DLLs.
-b
(Kernel mode only) This option has two effects:

1. The debugger will break into the target computer immediately upon connection.

2. After a reboot, the debugger will break into the target computer once the kernel is initialized. See Crashing and Rebooting the Target Computer for details and for other methods of changing this status.

-c " command "
Specifies the initial debugger command to run at start-up. This command must be enclosed in quotation marks. Multiple commands can be separated with semicolons. (If you have a long command list, it may be easier to put them in a script and then use the -c option with the $<, $><, $><, $$>< (Run Script File) command.)

If you are starting a debugging client, this command must be intended for the debugging server. Client-specific commands, such as .lsrcpath, are not allowed.

-clines lines
Sets the approximate number of commands in the command history which can be accessed during remote debugging. For details, and for other ways to change this number, see Using Debugger Commands.
-d
(Kernel mode only) After a reboot, the debugger will break into the target computer as soon as a kernel module is loaded. (This break is earlier than the break from the -b option.) See Crashing and Rebooting the Target Computer for details and for other methods of changing this status.
-e Event
Signals the debugger that the specified event has occurred. This option is only used when starting the debugger programmatically.
-ee { masm| c++}
Sets the default expression evaluator. If masm is specified, MASM expression syntax will be used. If c++ is specified, C++ expression syntax will be used. If the -ee option is omitted, MASM expression syntax is used as the default. See Evaluating Expressions for details.
-failinc
Causes the debugger to ignore any questionable symbols. When debugging a user-mode or kernel-mode minidump file, this option will also prevent the debugger from loading any modules whose images can't be mapped. For details and for other methods of controlling this, see SYMOPT_EXACT_SYMBOLS.
-g
(User mode only) Ignores the initial breakpoint in target application. This option will cause the target application to continue running after it is started or WinDbg attaches to it, unless another breakpoint has been set. See Initial Breakpoint for details.
-G
(User mode only) Ignores the final breakpoint at process termination. Typically, the debugging session ends during the image run-down process. This option will cause the debugging session to end immediately when the child terminates.
-hd
(Windows XP and later, user mode only) Specifies that the debug heap should not be used. See Behavior of Spawned Processes for details.
-I[ S]
Installs WinDbg as the postmortem debugger. For details, see Enabling Postmortem Debugging. After this action is attempted, a success or failure message is displayed. If S is included, this procedure is done silently if it is successful; only failure messages are displayed.

The -I parameter must not be used with any other parameters. This command will not actually start WinDbg, although a WinDbg window may appear for a moment.

-IA[ S]
Associates WinDbg with the file extensions .dmp, .mdmp, and .wew in the registry. After this action is attempted, a success or failure message is displayed. If S is included, this procedure is done silently if it is successful; only failure messages are displayed. After this association is made, double-clicking a file with one of these extensions will start WinDbg.

The -IA parameter must not be used with any other parameters. This command will not actually start WinDbg, although a WinDbg window may appear for a moment.

-IU KeyString
Registers debugger remoting as an URL type so that users can auto-launch a debugger remote client with an URL. KeyString has the format remdbgeng://RemotingOption. RemotingOption is a string that defines the transport protocol as defined in the topic Activating a Debugging Client. If this action succeeds, no message is displayed; if it fails, an error message is displayed.

The -IU parameter must not be used with any other parameters. Although a WinDbg window may appear for a moment, this command will not actually start WinDbg.

-i ImagePath
Specifies the location of the executables that generated the fault. If the path contains spaces, it should be enclosed in quotation marks. For details, and for other ways to change this path, see Executable Image Path.
-j
Allow journaling.
-k [ ConnectType]
(Kernel mode only) Starts a kernel debugging session. For details, see Choosing Kernel Debugging Settings . If -k is used without any ConnectType options following it, it must be the final entry on the command line.
-kl
(Windows XP and later, kernel mode only) Starts a kernel debugging session on the same machine as the debugger. For more details, see Attaching to a Target Computer (Kernel Mode).
-kx ExdiOptions
(Kernel mode only) Starts a kernel debugging session using an EXDI driver. EXDI drivers are not described in this documentation. If you have an EXDI interface to your hardware probe or hardware simulator, please contact Microsoft for debugging information.
-log{ o| a} LogFile
Begins logging information to a log file. If the specified log file already exists, it will be overwritten if -logo is used. If loga is used, the output will be appended to the file. For more details, see Keeping a Log File.
-lsrcpath
Sets the local source path for a remote client. This option must follow -remote on the command line.
-n
Noisy symbol load: Enables verbose output from symbol handler. For details and for other methods of controlling this, see SYMOPT_DEBUG.
-noinh
(User mode only) Prevents processes created by the debugger from inheriting handles from the debugger. For other methods of controlling this, see Spawning a New Process (User Mode).
-noprio
Prevents any priority change. This parameter will prevent WinDbg from taking priority for CPU time while active.
-noshell
Prohibits all .shell commands. This prohibition will last as long as the debugger is running, even if a new debugging session is begun. For details, and for other ways to disable shell commands, see Using Shell Commands.
-o
(User mode only) Debugs all processes launched by the target application (child processes). By default, processes created by the one you are debugging will run as they normally do. For other methods of controlling this, see Spawning a New Process (User Mode).
-p PID
Specifies the decimal process ID to be debugged. This is used to debug a process that is already running. For details, see Attaching to a Running Process (User Mode).
-pb
(Windows XP and later, user mode only) Prevents the debugger from requesting an initial break-in when attaching to a target process. This can be useful if the application is already suspended, or if you wish to avoid creating a break-in thread in the target. See Attaching to a Running Process (User Mode).
-pd
(Windows XP and later, user mode only) Causes the target application not to be terminated at the end of the debugging session. See Ending the Debugging Session for details.
-pe
(Windows XP and later, user mode only) Indicates that the target application is already being debugged. See Re-attaching to the Target Application for details.
-pn Name
Specifies the name of the process to be debugged. (This name must be unique.) This is used to debug a process that is already running. For details, see Attaching to a Running Process (User Mode).
-pr
(Windows XP and later, user mode only) Causes the debugger to start the target process running when it attaches to it. This can be useful if the application is already suspended and you wish it to resume execution. See Attaching to a Running Process (User Mode).
-psn ServiceName
Specifies the name of a service contained in the process to be debugged. This is used to debug a process that is already running. For details, see Attaching to a Running Process (User Mode).
-pt Seconds
Specifies the break timeout, in seconds. The default is 30. See Controlling the Target for details.
-pv
(User mode only) Specifies that the debugger should attach to the target process noninvasively. For details, see Noninvasive Debugging (User Mode).
-Q
Suppresses the "Save Workspace?" dialog box. Workspaces are not automatically saved. See Using Workspaces for details.
-QS
Suppresses the "Reload Source?" dialog box. Source files are not automatically reloaded.
-QSY
Suppresses the "Reload Source?" dialog box and automatically reloads source files.
-QY
Suppresses the "Save Workspace?" dialog box and automatically saves workspaces. See Using Workspaces for details.
-robp
This allows CDB to set a breakpoint on a read-only memory page. (The default is for such an operation to fail.)
-sdce
Causes the debugger to display File access error messages during symbol load. For details and for other methods of controlling this, see SYMOPT_FAIL_CRITICAL_ERRORS.
-secure
Activates Secure Mode.
-ses
Causes the debugger to perform a strict evaluation of all symbol files and ignore any questionable symbols. For details and for other methods of controlling this, see SYMOPT_EXACT_SYMBOLS.
-sflags 0x Number
Sets all the symbol handler options at once. Number should be a hexadecimal number prefixed with 0x — a decimal without the 0x is permitted, but the symbol options are binary flags and therefore hexadecimal is recommended. This option should be used with care, since it will override all the symbol handler defaults. For details, see Setting Symbol Options.
-sicv
Causes the symbol handler to ignore the CV record. For details and for other methods of controlling this, see SYMOPT_IGNORE_CVREC.
-sins
Causes the debugger to ignore the symbol path and executable image path environment variables. For details, see SYMOPT_IGNORE_NT_SYMPATH.
-snc
Causes the debugger to turn off C++ translation. For details and for other methods of controlling this, see SYMOPT_NO_CPP.
-snul
Disables automatic symbol loading for unqualified names. For details and for other methods of controlling this, see SYMOPT_NO_UNQUALIFIED_LOADS.
-srcpath SourcePath
Specifies the source file search path. Separate multiple paths with a semicolon ( ;). If the path contains spaces, it should be enclosed in quotation marks. For details, and for other ways to change this path, see Source Path.
-sup
Causes the symbol handler to search the public symbol table during every symbol search. For details and for other methods of controlling this, see SYMOPT_AUTO_PUBLICS.
-T Title
Sets WinDbg window title.
-v
Enables verbose output from debugger.
-W Workspace
Loads the given named workspace. If the workspace name contains spaces, enclose it in quotation marks. If no workspace of this name exists, you will be given the option of creating a new workspace with this name or abandoning the load attempt. For details, see Using Workspaces.
-WF Filename
Loads the workspace from the given file. Filename should include the file and the extension (usually .wew). If the workspace name contains spaces, enclose it in quotation marks. If no workspace file with this name exists, you will be given the option of creating a new workspace file with this name or abandoning the load attempt. For details, see Using Workspaces.
-WX
Disables automatic workspace loading. For details, see Using Workspaces.
-y SymbolPath
Specifies the symbol search path. Separate multiple paths with a semicolon ( ;). If the path contains spaces, it should be enclosed in quotation marks. For details, and for other ways to change this path, see Symbol Path.
-z DumpFile
Specifies the name of a crash dump file to debug. If the path and file name contain spaces, this must be surrounded by quotation marks. It is possible to open several dump files at once by including multiple -z options, each followed by a different DumpFile value. For details, see Analyzing a User-Mode Dump File with WinDbg or Analyzing a Kernel-Mode Dump File with WinDbg.
-zp PageFile
Specifies the name of a modified page file. This is useful if you are debugging a dump file and want to use the .pagein (Page In Memory) command. You cannot use -zp with a standard Windows page file — only specially-modified page files can be used.
executable
Specifies the command line of an executable process. This is used to launch a new process and debug it. This has to be the final item on the command line. All text after the executable name is passed to the executable as its argument string. For details, see Spawning a New Process (User Mode).
-?
Pops up this HTML Help window.

When you are running the debugger from the command line, specify arguments for the target application after application's file name. For instance:

windbg myexe  arg1 arg2

 

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

WinDbg Command-Line Options 的相关文章

  • Ubuntu查看系统日志的几种方法

    在 Ubuntu 22 10 中 你可以查看系统日志来排查错误 以下是几种查看日志的方法 一 Journalctl 命令 使用 journalctl 命令可以查看系统日志信息 包括引起闪退的错误信息 你可以运行以下命令来查看最新的系统日志
  • GDAL根据Shape文件切图(java)

    目地 用Java实现类似QGIS中 按掩膜图层裁剪栅格 的功能 其实QGIS本身调用的就是gdalwarp exe 官方文档 https gdal org programs gdalwarp html gdalwarp gdalwarp h
  • js == 运算规则解析

    1 先了解一下基本类型和复杂类型划分的依据 JS中的值有两种类型 原始类型 Primitive 对象类型 Object 原始类型包括 Undefined Null Boolean Number和String等五种 这两大类别的数据存储方式是
  • 启明智显分享

    提示 作为Espressif 乐鑫科技 大中华区合作伙伴及sigmastar 厦门星宸 VAD合作伙伴 启明智显不仅用心整理了你在开发过程中可能会遇到的问题以及快速上手的简明教程供开发小伙伴参考 同时也用心整理了乐鑫及星宸科技的新产品 新方
  • 软文营销研究目标关键词让内容简单明了

    随着行业的发展 许多企业正在进入文案领域 对于喜欢写作的人来说 这是一条很好的道路 但对某些人来说也可能具有挑战性 一些初学者可能会觉得自己没有写作能力达不到标准 因此本文178软文网小编将帮你决定并学习如何成写出一篇成功有效的文案 一 向
  • yolov3整体工作流程(个人理解,欢迎纠正和补充)

    以下内容纯属个人理解 请路过的小伙伴留下宝贵意见 欢迎纠正和补充 谢谢 yolov3的总体思想归纳 首先 将输入图片压缩到416 416 通过特征提取网络 Darknet53 without FC layer 对输入图像提取特征得到大小一定
  • ubuntu下设置网络

    修改文件 etc network interfaces 命令 sudo vi etc network interfaces 或 sudo gedit etc network interfaces 我的配置如下 interfaces 5 fi
  • QT的信号槽的四种写法和五种链接方式

    目录 四种信号槽写法 五种连接方式 实例 常见错误及改正 错误1 未连接信号与槽 错误2 信号和槽参数不匹配 错误3 未使用Q OBJECT宏 错误4 跨线程连接未处理 在Qt中 信号 Signal 和槽 Slot 是一种用于对象之间通信的
  • 对于搞钱我们是认真的

    前言 大家好 我是xiezhr 一提到搞钱 想必大家都非常非常感兴趣 立马就精神抖擞了 说实话 在这疫情爆发这几年里 赚点钱真不容易 不知道你是不是也跟我一样 一个人在夜深人静的时候就在想怎么才能通过自己程序员的身份来搞钱呢 今天 我们就来
  • 基于JAVA的图书馆书库管理系统

    源码下载 https wwa lanzous com iMbYtmlznri 更多源码 http byamd xyz 论文
  • 数学建模课程

    数学规划模型 2020 3 7 1 数学规划 简称最优化问题 2 最优化问题的数学模式的一般形式 三个要素 决策变量 目标函数 约束条件 所确定的x的范围为 可行域 满足 2 的解 可行解 同时满足 1 2 最优解 整个可行域上 全局最优解
  • TensorFlow2.x,GPU代码测试

    TensorFlow2 x GPU代码测试 代码如下 import tensorflow as tf import os os environ TF CPP MIN LOG LEVEL 2 不显示等级2以下的提示信息 print GPU t
  • 测试开发工程师需要掌握什么技能?

    如何理解测试开发 有人问测试开发是测试还是开发 本质上来说 还是测试 因为测试是核心 开发是手段 那么说 成为测试开发 需要那些必备的技能呢 不同level的测试工程师应具备的基本技能第一个 我们称之为测试员 测试工程师 直白一点说 就是干
  • pandas学习笔记(三)---重建索引与处理缺失值

    本文介绍pandas中重建索引与处理缺失值 文章目录 一 重建索引 1 1series重建索引 1 2 dataframe重建索引并修改缺失值 二 处理缺失值 2 1丢掉含有缺失值的行或者列 2 2 填充缺失值 2 3判断df中每个元素是否
  • QT设置背景图片的3种方式 & 区别——设置样式表styleSheet

    方式1 修改MainWindow主窗口 的 styleSheet 1 效果图 工具栏和状态栏 也加了背景 参考链接https blog csdn net mozai147 article details 84112744 2 选中编辑Mai

随机推荐

  • Angular学习笔记69:Angular项目的单元测试 -- 对服务进行测试

    对服务进行测试 服务通常是单元测试中最简单的文件类型 对于简单 没有其他依赖的服务 对于一个没有其他依赖的服务 Mock 一些数据 进行测试即可 例如 对于一个公共数据处理的服务 import Injectable from angular
  • mysql——锁

    三种锁问题 1 丢失修改 火车票问题 让第一个人丢失了修改 2 不可重复读 幻象 第二次读会读到不正确的数据 一个事务读到另一个已提交的事务 3 读 脏 数据 A修改值后又回滚 B读到修改后的值 即脏数据 或者是一个事务读到了另一个事务未提
  • office版本比较

    office LTSC 2021 专业增强版就是简化版的永久版的OFFICE 365罢了 建议还是装365划算 装的什么版本无所谓 激活的时候用的什么许可证才是决定你使用时版本的最终因素 比如装的 office 2021 最后用的2016的
  • ibm多服务器共用显示模块连接,IBM WebSphere 应用服务器多个模块跨站脚本漏洞

    IBM WebSphere 应用服务器多个模块跨站脚本漏洞 受影响系统 IBM Websphere Application Server 7 0 IBM Websphere Application Server 6 1 不受影响系统 IBM
  • 百度地图API取消点击景点弹出框

    有时候我们自己在地图上添加的标注会跟百度地图上面的景点商家标注重合 点击的时候就会弹出景点弹窗 就像这样 我们正常在创建地图的时候都是 var map new BMap Map allmap 创建Map实例 想要禁用百度地图景点弹窗需要添加
  • unity3d 学习笔记_____Native2d 刚体、碰撞器、关节的使用

    Mass Mass of the rigidbody Linear Drag Drag coefficient affecting positional movement Angular Drag Drag coefficient affe
  • [C语言】多种方法求2的n次方

    方法一 循环法 不断地乘以2 循环i次 int main int a i c 1 注意要初始化为1而不是0 scanf d i for a 1 a lt i a c c 2 printf d c return 0 方法二 左移法 一个数它左
  • unity 移动物体到指定位置的四种方法

    方法1 使用Vector3 MoveTowards void Update float step speed Time deltaTime gameObject transform localPosition Vector3 MoveTow
  • intellij idea远程调试

    前景 1 有些时候 调试不得不用外网 比如说做支付宝的支付接口 服务器后台通 知就不得不用外网的ip 无奈 只能扔到服务器远程调试了 2 java后台和app结合开发 app测试出了一些问题 又比较难重现 那么这个时候远程调试就可以派上用场
  • IP地址分类和数据包传输过程用到的协议

    ip地址分类 单播地址 A 0XXX XXXX 0 127 1 126 B10XX XXXX 128 191 C110X XXXX 192 223 组播地址 D1110 XXXX 224 255 私有地址 E1111 XXXX 240 25
  • 生产者与消费者模式(线程的同步与互斥)

    条件变量 条件变量的提出首先要涉及一个概念 就是生产者消费者模型 生产者消费者 是在多线程同步的一个问题 两个固定大小缓冲区的线程 在实际运行是会发生问题 生产者是生成数据放入缓冲区 重复过程 消费者在缓冲区取走数据 生产者消费者的模型提出
  • adapterview android,AdapterView

    AdapterView 版本 Android 2 3 r1 结构 继承关系 public abstract class AdapterView extends ViewGroup java lang Object android view
  • QT构建好的exe在指定目录运行出现找不到dll或者定位不到程序入口点解决方法

    win10系统的话打开这台电脑 然后再系统环境变量中将D QtEnvironment 5 12 3 mingw73 32 bin添加到Path中 并且上移 解决Qt生成exe错误 无法定位程序输入点
  • 五种方法解除开机密码

    5种方法解除开机密码 教你怎样解除电脑开机密码 先记下来 以后总会有用到的 此方法仅供计算机教师交流 严禁作为非法手段使用
  • 生成项目目录树

    写项目设计文档或者在写新项目的README md文件时 都需要展示项目的一些重要的目录结构 其实可以通过安装brew等方法来进行 但是推荐一个插件 vscode中下载插件tree generator 安装完成后打开需要生成的目录结构树的项目
  • 深度学习(6):图像超分辨率(Image Super Resolution)重建

    目标 使用深度学习技术对图像进行超分辨率重建 涉及到的技术包括卷积神经网络 生成对抗网络 残差网络等 技术 本实验使用到 Jupyter Notebook 等开发组件 涉及到了 TensorFlow NumPy scipy misc PIL
  • LeetCode160-------相交链表(java)

    题目中文链接 编写一个程序 找到两个单链表相交的起始节点 例如 下面的两个链表 节点 c1 开始相交 注意 如果两个链表没有交点 返回 null 在返回结果后 两个链表仍须保持原有的结构 可假定整个链表结构中没有循环 程序尽量满足 O n
  • 有哪些期货交易理念(期货交易的概念及主要特征)

    在期货和股票市场里面 什么是交易理念 所谓交易理念 我认为就是你所认为的构建你交易策略的基础 是制定交易系统的逻辑基础 比如 你觉得现在是涨势 那么在回调的时候做多 是一种交易理念 跌势 反弹放空是一种交易理念 震荡市 震荡区间下不开多 上
  • 斐讯r1换网络_新房装修网络布线方案二:客厅电视柜放单个路由器覆盖全屋

    继续研讨新房装修的家庭网络搭建的问题 我昨天推荐的是一个AC AP的方案 如果是小户型 对网络这块要求并不高 比如 并不要求全屋都5G覆盖满的 基于成本考虑 可以先不上AC AP 先用一个性能稍好的千兆路由器 比如 斐讯的K2p 网件R70
  • WinDbg Command-Line Options

    First time users of WinDbg should begin with the Debugger Operation section The WinDbg command line uses the following s