lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hallo!

Thanks for that information and for your autoexp.dat addon.

Does this also work with Lua 5.0? I'm asking this because when I debug with Lua 5.0, after registration of some functions, I get (error) entries in the debugger instead of globals and registry.
Do I have to change something?

Thank you in advance,
Stefan Schwarzbach

Quoting Glenn Maynard <glenn@zewt.org>:

VC's autoexp.dat allows custom visualizations for data types in the
watch window.  A good description is at:

   http://www.virtualdub.org/blog/pivot/entry.php?id=120

Add a lua_State* to the watch window, and see the current stack,
with most basic types.  Tables show metatables; string contents
and numbers are shown; inside a C closure, upvalues are listed.
One really nifty thing it does is resolve pointers, so you see
the real names of C functions.

The annoying: When when the Lua stack changes, it collapses the whole
tree.  Tables are limited: it shows both the array part and the hash
part, but I couldn't get #list to work on the hash part, so you have
to open the hash entries and walk each next-> chain yourself.
Workarounds welcome.

(It would be nice if Lua types had less ambiguous names than "Node".
Although these are private types, it still causes namespace problems
for gadgets like this.)

Examples:

http://zewt.org/~glenn/lua-watch1.jpg - types, tables, threads
http://zewt.org/~glenn/lua-watch2.jpg - call info, upvalues

Back up "C:\Program Files\Microsoft Visual Studio 8\Common7\
Packages\Debugger\autoexp.dat" and append to the end, before
the [hresult] section.  I'll wait to put it on the wiki until
I've used it a bit more.

You may need to have Lua compiled directly into your application
for this to work.  If you're using it as a library, the internal
data structures may not be visible to VC's debugger.

--
Glenn Maynard




.....................................................
Stefan Schwarzbach
Geschäftsführer & Lead Programmer
Silent Dreams

Talhofstr. 6
82205 Gilching
+49 Germany

Tel.   +49 8105 7749776
Mobil  +49 179 5162222
Email  Schwarzbach@SilentDreams.de
Web    www.SilentDreams.de