I know that STM32 discovery boards could debug another STM32 chip. But could it debug STM8 chip too? Is STM8's debugging interface compatible with SWD?
No. STM8 parts use SWIM, not SWD.
The standalone ST-Link v2 supports SWIM, but the embedded ones on Discovery and Nucleo boards do not.