From WikiChip
Difference between revisions of "mirc/commands/debug"
< mirc‎ | commands

(Created page with "The '''/debug command''' outputs raw server messages to a file or a custom window Incoming messages are prefixed with '''<-''' and outgoing messages are prefixed with '''->''...")
 
(fixed formatting error)
Line 21: Line 21:
 
//debug -p @Raw</syntaxhighlight>
 
//debug -p @Raw</syntaxhighlight>
  
<syntaxhighlight lang="mIRC">;The line can be \'piped\' through an alias on its way to the log file.
+
<syntaxhighlight lang="mIRC">;The line can be 'piped' through an alias on its way to the log file.
  
 
/debug -i Log.txt $console
 
/debug -i Log.txt $console
Line 35: Line 35:
 
   else aline -p 4 @Console << $2-
 
   else aline -p 4 @Console << $2-
  
   ; return the line back to mIRC\'s log
+
   ; return the line back to mIRC's log
 
   return $1-
 
   return $1-
 
}</syntaxhighlight>
 
}</syntaxhighlight>

Revision as of 20:35, 2 December 2013

The /debug command outputs raw server messages to a file or a custom window Incoming messages are prefixed with <- and outgoing messages are prefixed with ->

Synopsis

/debug [-cinpt] [color] [on | off | @window | filename] [identifier]

Switches

  • -c - Turns off debugging (close associated window as well)
  • -i - Call a specific identifier before debug is logged
  • -n - Minimize the custom window
  • -p - Wrap text
  • -t - Timestamp

Parameters

  • [color] - Optional text color for the debug window
  • [on|off] - Turns debug on or off
  • [@window|filename] - outputs to a custom @window or a file
  • [identifier] - Calls an identifier before logging the debugged line (the returned value if used for the logging)

Example

;Opens @raw debug window (wrap text+
//debug -p @Raw
;The line can be 'piped' through an alias on its way to the log file.
 
/debug -i Log.txt $console
 
Alias console {
  ; split by spaces
  tokenize 32 $1-
 
  ; open window if not already opened
  if (!$window(Console)) window -e @Console
 
  if (<- == $1) aline -p 9 @Console >> $2-
  else aline -p 4 @Console << $2-
 
  ; return the line back to mIRC's log
  return $1-
}

Compatibility

Added: mIRC v6.0

Added On: 03/02/2002

Note: Individual switches were not taken into consideration.

See also