Share via


bootcfg debug

適用於:Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012

新增或變更指定作業系統項目的偵錯設定。

注意

如果您嘗試偵錯連接埠 1394,請改用 bootcfg dbg1394 命令。

語法

bootcfg /debug {on | off | edit}[/s <computer> [/u <domain>\<user> /p <password>]] [/port {COM1 | COM2 | COM3 | COM4}] [/baud {9600 | 19200 | 38400 | 57600 | 115200}] [/id <osentrylinenum>]

參數

參數 描述
{on | off | edit} 指定連接埠偵錯的值,包括:
  • 開啟。 將 /debug 選項新增至指定的 <osentrylinenum>,以啟用遠端偵錯支援。
  • 關閉朗讀程式。 從指定的 <osentrylinenum>移除 /debug 選項,以停用遠端偵錯支援。
  • edit。 允許透過變更與指定 <osentrylinenum> 之 /debug 選項相關聯的值,來變更連接埠和傳輸速率設定。
/s <computer> 指定遠端電腦的名稱或 IP 位址 (請勿使用反斜線)。 預設是本機電腦。
/u <domain>\<user> 使用 <user>or<domain>\<user> 指定的使用者的帳戶權限執行行該命令。 預設值為發出命令之電腦上的目前已登入使用者權限。
/p <password> 指定 /u 參數中指定的使用者帳戶密碼。
/port {COM1 | COM2 | COM3 | COM4} 指定要用於偵錯的 COM 連接埠。 如果偵錯已停用,請勿使用此參數。
/baud {9600 | 19200 | 38400 | 57600 | 115200} 指定要用於偵錯的傳輸速率。 如果偵錯已停用,請勿使用此參數。
/id <osentrylinenum> 指定 Boot.ini 檔案的 [operating systems] 區段中新增作業系統載入選項的作業系統項目行號。 [operating system] 區段標頭後面的第一行是 1。
/? 在命令提示字元顯示說明。

範例

若要使用 bootcfg /debug 命令:

bootcfg /debug on /port com1 /id 2
bootcfg /debug edit /port com2 /baud 19200 /id 2
bootcfg /s srvmain /u maindom\hiropln /p p@ssW23 /debug off /id 2