Guidance on Debugging Lua - watch variables and stack live #13
Replies: 2 comments 2 replies
-
Unfortunately being able to visualize variable values in real-time is not implemented yet. I developed the debugger module primarily to debug Textadept itself, not to debug generic Lua scripts, and the hover-display of variables was good enough for me. A richer debug experience hasn't been high on the priority list :( I'm glad you at least got the debugger working. I sometimes struggle with it.
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
slipsnip
-
I am advice based on my vast personal experience, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to understand how the debugger module for lua works as I have downloaded the modules linked under Downloads at https://orbitalquark.github.io/textadept/ and have added
require('lsp') require('debugger') require('debugger.lua')
to my init.lua
I can see the Debug menu and interact with it or use the keyboard shortcuts but am confused as to how i can get live feedback of variables I watch without hovering over each variable that I am interested in as I step. In the README.MD it says to
require('debugger')
in init.lua and that will give me the Debug menu which it does, it goes on to say that you need LuaSocket, which I have and then gives an example of what to add to your C program but lacks a lua example probably because it should be obvious but I am new to both Lua and Textadept.Could anyone direct me on how I can properly debug a lua script. I can set breakpoints, start and stop the debugger and step. However with other editors I am used to having another window or frame with a list of variables I wish to watch, I can set conditional breakpoints and look at the stack. I can Debug>Set watch expression but once entered that dialog disapears. I can inspect with Alt+= or simply hovering my mouse over a variable however this is not as helpful as having a live feedback as I step through a loop for example.
Any guidance would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions