Use the following techniques to debug your minidriver:
If your startup code is able to print data to a serial port or other debug device, then you can use kprintf() to print any variable you wish to see, e.g. in your minidriver code:
kprintf("I am the minidriver!\n"); kprintf("Global variable mcounts=%d\n", mcounts);
Include any data that you wish to collect in the shared memory area allocated for your minidriver. After the kernel has booted, you can examine the data inside the shared memory area. See the mini-peeker.c program for an example of doing this.
Depending on your hardware, you could use JTAG. If LEDs or other diagnostics are available, your minidriver could output values to hardware registers or ports to indicate certain conditions.