rem: if (message->Code() == B_DEBUGGER_MESSAGE_THREAD_STOPPED) { get_debug_why_stopped_string(message->Data().thread_stopped.why, buffer, sizeof(buffer)); } else if (message->Code() == B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED) { get_debug_exception_string(message->Data().exception_occurred.exception, buffer, sizeof(buffer)); } else {  sprintf(buffer, "Debug messages %ld", (int32)message->Code());
add: switch (message->Code()) { case B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED: get_debug_exception_string( message->Data().exception_occurred.exception, buffer, sizeof(buffer)); break; case B_DEBUGGER_MESSAGE_DEBUGGER_CALL:  case B_DEBUGGER_MESSAGE_THREAD_DEBUGGED: case B_DEBUGGER_MESSAGE_BREAKPOINT_HIT: case B_DEBUGGER_MESSAGE_WATCHPOINT_HIT: case B_DEBUGGER_MESSAGE_SINGLE_STEP: default: get_debug_message_string(message->Code(), buffer, sizeof(buffer)); break;
context: ThreadDebugHandler::HandleMessage(DebugMessage *message){	if (!fInvoker)		fInvoker = new BInvoker(new BMessage(ALERT_MESSAGE), this);	// get some user-readable message	char buffer[512];	if (message->Code() == B_DEBUGGER_MESSAGE_THREAD_STOPPED) {		get_debug_why_stopped_string(message->Data().thread_stopped.why, buffer,			sizeof(buffer));	} else if (message->Code() == B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED) {		get_debug_exception_string(message->Data().exception_occurred.exception,			buffer, sizeof(buffer));	} else {		// We shouldn't be here.		sprintf(buffer, "Debug messages %ld", (int32)message->Code());	}	// TODO: This would be the point to pop up an asynchronous alert.	// We just print the error and send a message to ourselves.	printf("debug_server: Thread %ld entered the debugger: %s\n", fThread,		buffer);	BMessage alertMessage(*fInvoker->Message());	alertMessage.AddInt32("which", 1);	fInvoker->Invoke(&alertMessage);	return false;}