At Thu, 26 Feb 2009 22:45:47 +0100 kba wrote: > > > > > how do you debug your rc.lua? Is there a simple way to log to > > > > > ~/.xsession-errors or some other file? I understand lua's control > > > > > structures, variable assignment, string matching and all that, but I > > > > > don't know what's good practice for debugging. > > > > > > > > > > > > > try this > > > > > > > http://awesome.naquadah.org/wiki/index.php?title=Using_Xephyr#Script_I_use_to_debug_rc.lua > > > . > > > > > > Very nice, I totally missed that page. I didn't know xserver sessions > > > could be nested, that's great! Thanks for the link. > > > > > Yea, that's why I wrote that wiki. I didn't know of this possibility and > > looks like few people do know about it... > > Thanks for writing it then ;-) However, I still don't know how to write > to stdout so I can debug my network widget. I tried variations of > 'io.stdout:write' and 'print' but the messages never appear. What's the > right syntax for this? > > thanks > kba >
print(foo) is the right syntax. Awesome might output those things to stderr
though, which would require you to start it from a terminal. If the print()
statements aren't issued in a totally fast rate, you can also use
naughty.notify({ text = foo })
to display something in a little box on top of your screen. You might need to
do
require("naughty")
before it that doesn't work.
--
GCS/IT/M d- s+:- a--- C++ UL+++ US UB++ P+++ L+++ E--- W+ N+ o--
K- w--- O M-- V PS+ PE- Y+ PGP+++ t+ 5 X+ R tv+ b++ DI+++ D+++ G+
e- h! r y+
Gregor Best
signature.asc
Description: PGP signature
