lua-users home
lua-l archive

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

What about autoexp-lua for VC 9?

2006/10/17, Glenn Maynard <>:
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.
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: - types, tables, threads - 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