LuaPanda icon indicating copy to clipboard operation
LuaPanda copied to clipboard

日志消息(logpoint)中的`{}`表达式没有被替换,直接原样打印出来了

Open zfl9 opened this issue 3 years ago • 3 comments

Describe the bug vscode可以添加记录点(在行号前右键,弹出菜单的第三个选项:"添加记录点...")。我看vscode官方文档说,{}花括号里面的表达式会被自动求值,比如输入一行 result is: {result}(result是日志点上方的一个函数返回值变量),那么当程序运行到这个记录点处时,应该会在调试控制台自动打印出 "result is: 100" 这种字符串(假设result的值为100)。但实际上,luapanda只会打印出 "result is: {result}",并没有对{}中的表达式进行求值。

Expected behavior 应该对{}花括号中的表达式进行求值,替换到最终的打印结果中。

Desktop (please complete the following information):

  • OS: Windows10
  • Visual Studio Version 1.55.2
  • LuaPanda Version 3.2.0
  • Framework 原生Lua,没有使用框架

zfl9 avatar Apr 20 '21 05:04 zfl9

收到。记录点我们目前是直接打印了,没有做表达式计算。后面可以考虑加上

stuartwang avatar Apr 26 '21 02:04 stuartwang