Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持展开字段 #271

Open
sumneko opened this issue Sep 8, 2023 · 3 comments
Open

支持展开字段 #271

sumneko opened this issue Sep 8, 2023 · 3 comments

Comments

@sumneko
Copy link
Contributor

sumneko commented Sep 8, 2023

TypeScript中的功能演示:

lazy

我有一张表,里面有部分字段是在访问时求值并缓存的。希望有种方式可以告诉调试器表里有这些字段,调试器可以点击展开按钮来当场访问这些字段。

@actboy168
Copy link
Owner

这个实现起来不复杂,困难点在于如何让调试器知道你有这些字段。js有getter,但lua只有__index

@sumneko
Copy link
Contributor Author

sumneko commented Sep 8, 2023

我可以元表里面放个特殊的字段,比如 __debugger_getter

@actboy168
Copy link
Owner

有空改一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants