Decoda Debugging support
Raptormeat
Join Date: 2012-05-05 Member: 151602Members
in Decoda
I'm loving Decoda- it's a complete lifesaver and I bought a licence. My only problem with it is that I can't get the__towatch() function to work.
I'm using Luabind, so perhaps that's the problem, but I can't seem to figure out how to write a __towatch() function that Decoda will discover.
I've also tried just bypassing this altogether and writing __towatch() directly in Lua. I've found that this doesn't work either. When I put an object in the watch window, it gives the "no operator defined" error. When I call the __towatch() function directly though, even if done in the watch window, it works fine.
Can anyone offer any tips about this? I tried emailing support but I never received a response.
I'm using Luabind, so perhaps that's the problem, but I can't seem to figure out how to write a __towatch() function that Decoda will discover.
I've also tried just bypassing this altogether and writing __towatch() directly in Lua. I've found that this doesn't work either. When I put an object in the watch window, it gives the "no operator defined" error. When I call the __towatch() function directly though, even if done in the watch window, it works fine.
Can anyone offer any tips about this? I tried emailing support but I never received a response.
Comments
Additionally, the main problem I was dealing with was a misunderstanding of how Luabind's class system worked. It turns out that all userdata "classes" registered with Luabind use the same metatable. What I was doing wasn't working, and trying to give them all individual __towatch() functions also wasn't going to work.
What I did was create a single watch function in Lua, which calls a C++ method which all of my Luabind classes have defined, and returns the data according to the requirements fsfod laid out. Then I created an instance of ANY Luabind class, grabbed its metatable, and set __towatch() to this function. Now all Luabind classes call this function in the watch window.
Hope that makes sense and helps out anyone from Google with a similar problem.