how to debug this

Arduino: 1.8.3 (Windows XP), Board: "Arduino/Genuino Uno"

WARNING: Category 'Real-time clock' in library DS3231 is not valid. Setting to 'Uncategorized'
Build options changed, rebuilding all
real:4: error: 'RTC_ds3231' does not name a type

RTC_ds3231 rtc;

^

C:\Documents and Settings\user\My Documents\Arduino\real\real.ino: In function 'void setup()':

real:20: error: 'rtc' was not declared in this scope

rtc.begin();

^

C:\Documents and Settings\user\My Documents\Arduino\real\real.ino: In function 'void loop()':

real:394: error: 'rtc' was not declared in this scope

DateTime now = rtc.now();

^

real:626: error: 'class DateTime' has no member named 'dayOfTheWeek'

loop6:int v=now.dayOfTheWeek();

^

C:\Documents and Settings\user\My Documents\Arduino\real\real.ino: In function 'void alarm()':

real:687: error: 'rtc' was not declared in this scope

DateTime now = rtc.now();

^

C:\Documents and Settings\user\My Documents\Arduino\real\real.ino: In function 'void alarmm(int, int, char)':

real:1079: error: 'rtc' was not declared in this scope

DateTime now = rtc.now();

^

exit status 1
'RTC_ds3231' does not name a type

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

It sounds like you have the RTC library installed incorrectly.

Why did you not post the code that causes the error, a link to libraries used and a description of the hardware being used ?

I assume that you have read the stickies at the top of the forum page, in particular read this before posting a programming question