如何在启动时关闭Windows内核调试?

发布于 2024-10-20 10:01:24 字数 765 浏览 5 评论 0原文

我有一台 Vista 32 位机器,我想在其上启用本地内核调试。 在 WinDbg 中,我选择“文件/内核调试”,然后选择“本地”选项卡,然后单击“确定”。 我收到以下消息。

系统不支持本地内核调试。 ... Windows Vista 中默认禁用本地内核调试,您必须运行“bcdedit -debug on”并重新启动才能启用它。

我天真地按照说明进行操作,打开提升的命令提示符并输入“bcdedit -debug on”并重新启动。

但是,重新启动后,系统在进入登录屏幕时挂起 - 或者在我输入用户名和密码后挂起。

我怀疑正在发生的事情是因为启用了调试器,所以在内核调试器进程中触发了用户模式异常,并且它正在等待我从附加的调试器输入一些输入?

我希望在实际的目标机器上进行调试。

我的问题是,每次我启动时 - 无论我选择什么 F8 启动选项 - 它总是挂起或到目前为止然后重新启动 - 然后挂起。

以安全模式启动 - 接近登录屏幕,然后重新启动。 这同样适用于命令行和网络启动选项。 最后一次正确的配置 - 也挂起。

有什么方法可以在 Windows 加载之前更改启动选项,以便我可以关闭内核调试。我只有一个启动配置,事后看来,这是我的问题 - 我应该为我的调试启动选项创建第一个启动配置的副本。

不幸的是,系统没有串行端口,所以我无法尝试通过它进行调试。

我现在能想到的唯一选择是尝试通过 USB 端口从另一台机器连接调试器。但是,我是否需要将目标 PC 配置为接受 USB 端口上的调试器,或者如果我有合适的调试 USB 电缆,这是否可以正常工作?

I have a Vista 32 bit machine which I wanted to enable local kernel debugging on.
In WinDbg I selected File/Kernel Debug and selected the Local tab and clicked ok.
I got the following message.

The system does not support local kernel debugging.
...
Local kernel debugging is disabled by default in Windows Vista, you must run 'bcdedit -debug on' and reboot to enable it.

I naively followed the instructions and opened an elevated command prompt and typed 'bcdedit -debug on' and the rebooted.

However, on reboot the system hangs when it gets to the logon screen - or just after I type in my username and password.

I suspect what is happening is that because a debugger is enabled, user mode exceptions are being triggered in the kernel debugger process and it is waiting for me to enter some input from an attached debugger??

I was hoping to debug on the actual target machine.

My problem is that every time I boot - whatever F8 boot option I choose - it always either hangs or gets so far and then reboots - and then hangs.

Booting in Safe Mode - gets close to the logon screen and then reboots.
Same applies for the command line and network boot options.
Last known good config - hangs too.

Is there any way to change the boot option before Windows loads so that I can turn off kernel debugging. I have only the one boot config which was, in hindsight, my problem - I should have created a copy of the first boot config for my debug boot option.

Unfortunately the system doesn't have a serial port so I can't attempt to debug through that.

The only option I can think of now is to attempt to connect a debugger from a different machine through a USB port. However, don't I need to configure the target PC to accept a debugger on a USB port or will this just work if I get a proper debug USB cable?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

祁梦 2024-10-27 10:01:24

找出如何让机器再次运行的方法。

重新启动期间按 F8 会出现“修复”选项。
选择修复并提供许多其他选项,包括恢复到以前的还原点以及打开命令提示符。

我尝试过以下操作...

打开命令提示符并输入“bcdedit -debug off”,该命令已被接受,但似乎没有帮助。
然后我尝试恢复到几天前的还原点。我再次在重新加载上遇到了困难。

原因是......这些实际上都没有关闭启动配置的调试选项。

我需要做的是:在“修复”菜单中 - 打开命令提示符。
然后键入 bcdedit /enum 以列出启动配置。
然后调用

bcdedit /set {default} debug off

我猜我最初尝试调用 bcdedit -debug off 是在启动管理器配置上将其关闭(它已经是),因为我没有指定特定的配置名称。

Worked out how to get the machine running again.

Pressing F8 during reboot gives the Repair option.
Selecting Repair and gives a number of other options including Restoring to a previous restore point and also opening a command prompt.

I had tried the following...

Opening a command prompt and typing "bcdedit -debug off" which was accepted but didn't seem to help.
I then tried restoring to a restore point of a couple of days previous. Again I got a hang on reload.

The reason,.... neither of these actually turned off the debug option for the boot config.

What I needed to do was: in the Repair menu - open a command prompt.
Then type bcdedit /enum to list the boot configs.
Then call

bcdedit /set {default} debug off

I guess my initial attempts to call bcdedit -debug off were turning it off on the (which it already was) on the boot manager config because I didn't specify a particular config name.

莫相离 2024-10-27 10:01:24

无需使用修复选项!只需按F10而不是F8,现在您就可以编辑启动参数了!只需删除 /DEBUG 并按 Enter 键即可继续启动过程。设置后,使用 bcdedit -debug off 永久更改调试选项。

There is no need for to use the repair option! Just press F10 instead of F8, now you will be able to edit the bootparameter! Just delete /DEBUG and press enter to continue the boot process. After set use bcdedit -debug off to permanently change the debug option.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文