Closed UltraEngine closed 1 year ago
Here is one possible solution, but it's ugly:
struct TESTCLASS
{
operator int() const
{
return 0;
}
};
struct TESTCLASSWRAPPER : private TESTCLASS
{};
L->new_usertype<TESTCLASSWRAPPER>("TESTCLASS");
I was able to implement a fix for this using the wrapper technique described above. The debugger works correctly now with C++ tables.
If you bind any class with an operator int() method, it will cause an error with the devcat Lua debugger.
When you debug any Lua program, variables appear correctly in the sidepanel display, but hovering the mouse over a variable will cause the program to exit break mode and continue executing: Any simple program will do it:
The reason I am using this operator is so I can do things like this in my C++ table class:
This is probably the same problem I had when I tried to integrate nlohmann::json with sol.