📄 java_debug.h
字号:
/* ^_^
*
* Copyright (c) 2006 Hexin
*
* Description:
* TODO:
* Create:
* Date Time Author
* ------------------------------------------------
* 2006-3-17 13:21:02 XiaoWei
*/
/* ^_^
* Location :
* File : JAVA_Debug.h
* Version : 1.0.0.0
* Note :
*/
#ifndef __JAVA_Debug_h__
#define __JAVA_Debug_h__
#include "JAVA_Config.h"
#include <assert.h>
#ifdef _WINDOWS
#include <windows.h>
#define SHOWMESSAGE(msg) ::MessageBox(0,msg,0,0);
#endif
#ifdef _CONSOLE
#include <iostream>
using namespace std;
#define SHOWMESSAGE(msg) cout << msg << endl;
#endif
#ifdef _DEBUG
#define JAVA_ASSERT_MSG(a,msg) if((a)) {SHOWMESSAGE(msg); assert(a);}
#else
#define JAVA_ASSERT_MSG(a,msg)
#endif
#ifdef _DEBUG
#define JAVA_ASSERT(a) assert(a);
#else
#define JAVA_ASSERT(a)
#endif
/*
for MFC
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
*/
#ifdef _DEBUG
#ifdef new
#undef new
#endif
#endif
#include <stdio.h>
#include <stdarg.h>
#include <windows.h>
#ifdef _DEBUG
# define JAVA_USER_DEBUGVIEW
#else
# define JAVA_USER_DEBUGVIEW
#endif
#ifdef JAVA_USER_DEBUGVIEW
static void _DebugView(const JTCHAR* lpszFormat,...)
{
va_list args;
va_start(args, lpszFormat);
int nBuf;
JTCHAR _DebugString[512] = {0};
nBuf = _vprintf(_DebugString, 512, lpszFormat, args);
_DebugString[511] = '\0';
_OutputDebugString(_DebugString);
va_end(args);
}
#define JAVA_DEBUGVIEW _DebugView
#define JAVA_DEBUGVIEW1(p1) _DebugView(p1)
#define JAVA_DEBUGVIEW2(p1,p2) _DebugView(p1,p2)
#define JAVA_DEBUGVIEW3(p1,p2,p3) _DebugView(p1,p2,p3)
#define JAVA_DEBUGVIEW4(p1,p2,p3,p4) _DebugView(p1,p2,p3,p4)
#define JAVA_DEBUGVIEW5(p1,p2,p3,p4,p5) _DebugView(p1,p2,p3,p4,p5)
#else //HX_USER_DEBUGVIEW
inline void _Hx_DebugView(const char* lpszFormat,...){};
#define JAVA_DEBUGVIEW 1? (void)0:_Hx_DebugView
#define JAVA_DEBUGVIEW1(p1)
#define JAVA_DEBUGVIEW2(p1,p2)
#define JAVA_DEBUGVIEW3(p1,p2,p3)
#define JAVA_DEBUGVIEW4(p1,p2,p3,p4)
#define JAVA_DEBUGVIEW5(p1,p2,p3,p4,p5)
#endif //HX_USER_DEBUGVIEW
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -