Kernel Debugging with VMWare Fusion
Power on the target VM, in an elevated command prompt:
bcdedit /debug on
bcdedit /dbgsettings serial debugport:1 baudrate:115200
Power off both the target (debuggee) and development (debugger) VMs.
Navigate to the .vmwarevm package for each VM, right click, select "Show Package Contents" (or cd into the VM's package).
Remove all references to the existing
serial0 port, which is used for config-free printing. Copy-and-paste the configuration below, modifying it where necessary.
serial0.present = "TRUE"
serial0.pipe.endPoint = "client" # change to "server" for the target VM
serial0.fileType = "pipe"
serial0.yieldOnMsrRead = "TRUE"
serial0.startConnected = "TRUE"
serial0.fileName = "/tmp/kdpipe" # or any other world-writeable path
Power on your VMs, and use Windbg from the development VM to connect over com0.
VMWare Fusion Power-On Order
- Client: You run windbg on this
- Server: You break the kernel on this
- Start the server first, since it is the pipe "server" and must create the pipe.
- Start the client next.
- Start windbg, and get it waiting on com0.
- The server will have booted all the way into windows by now, so you won't be able to connect yet
- Restart the server