It depends on what you really need. Probably simple `printk()` function is gonna be OK for the beginning. There is also the `/proc` interface you can use to get useful information from kernel.
If you need something more complicated, use KGDB (kernel debugger).