📄 console.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<TITLE>Diagnostic console</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<OBJECT TYPE="application/x-oleobject" CLASSID="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<PARAM NAME="Keyword" VALUE="Console, diagnostic">
<PARAM NAME="Keyword" VALUE="Diagnostic console">
</OBJECT>
<H2><A NAME="chat"></A>Diagnostic console</H2>
<center>
<img src="../images/console.png" width=551 height=449 alt="">
</center>
<p>
<P>The diagnostic console provides a mechanism which permits <i>Speak Freely</i>
developers to easily add diagnostic output for various aspects of the
program and implement interactive diagnostic facilities without
all the complexity of a full-fledged Windows graphical interface. The
diagnostic console works like a command-line window, displaying output
which scrolls on a line by line basis and permitting the entry of
diagnostic commands. To display the console, select the Help/Diagnostic Console
menu item.
<p>
The output sent to the diagnostic console tends to be ephemeral in
nature; it generally reflects recently-added capabilities where
remote diagnosis may be required, with console output being removed
as features are judged stable. Likewise, the diagnostic commands available
change as features pass from active development to maturity. You can
always obtain a list of the current diagnostic commands by entering
the <tt><b>help</b></tt> command. For details about the various commands
and their arguments, as well as a description of messages you may see
displayed in the diagnostic console, please refer to the
<i>Speak Freely</i>
<a href="log.htm">Development Log</a>.
<h3>For Developers: Using the Diagnostic Console</h3>
Developers modifying the <i>Speak Freely</i> source code can write debug
output to the diagnostic console with the following functions:
<p>
<pre>
void consoleLog(char *text);
void cPrintf(LPCSTR lpFormat, ...);
void vcPrintf(LPCSTR lpFormat, va_list arglist);
</pre>
</p>
<b><tt>consoleLog()</tt></b> writes its argument text string to the
console, while <b><tt>cPrintf()</tt></b> and <b><tt>vcPrintf()</tt></b>
format data identically to <b><tt>printf()</tt></b>, taking a
variable argument list or <b><tt>va_list</tt></b> respectively.
Note that when the diagnostic console is not displayed, these
functions have essentially zero overhead, so you needn't feel
guilty calling them in frequently executed code.
<p>
To add a new diagnostic command, add a branch to the command processing
logic in <b><tt>consoleProcessCommand()</tt></b> in <tt>Console.c</tt>, and be sure to add a brief
description of your command to the help text in <b><tt>consoleHelp()</tt></b>.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -