[squeak-dev] Stdio updates
David T. Lewis
lewis at mail.msen.com
Mon Jan 24 04:30:39 UTC 2011
On Sun, Jan 23, 2011 at 11:00:18PM -0500, Chris Cunnington wrote:
>
> Since playing with MicroSqueak I've been staring with covetous eyes at
> Interpreter>>print: which is nothing more than printf(). I want to be
> able to print output not to a log file, but back to the terminal.
> MicroSqueak does that with #primitiveExitToDebugger (which uses
> #printCallStackFrom:).
If you are using unix/linux, then you can just open a file stream
on /dev/tty. Be sure to flush after writes.
You also have these:
OSProcess class>>debugMessage: aString
"Print aString on standard output. The debug message is prefixed with the
identity of the process in which the method is being evaluated, and the
identity of the object which received the message. Useful for debugging
timing or deadlock problems."
OSProcess class>>trace
"Print the sender's context on standard output. The debug message is
prefixed with the identity of the process in which the method is being
evaluated, and the identity of the object which received the message.
Useful for debugging timing or deadlock problems."
OSProcess class>>trace: debugMessageString
"Print trace information followed by a debug message"
> I'm haunted by the idea of creating a command line Squeak interface.
ExternalCommandShell class>>start
<http://wiki.squeak.org/squeak/6023>
Dave
More information about the Squeak-dev
mailing list
|