[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: VC2005, autoexp.dat - examine the Lua stack in the debugger
- From: "Юткин Алексей Валерьевич" <ayutkin@...>
- Date: Mon, 7 Apr 2008 23:31:58 +0400
What about autoexp-lua for VC 9?
2006/10/17, Glenn Maynard <firstname.lastname@example.org>:
VC's autoexp.dat allows custom visualizations for data types in the
watch window. A good description is at:
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.
(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.)
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.