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

[UX Suggestion] Add "command not found" error message? #69

Open
vyder opened this issue May 5, 2020 · 0 comments
Open

[UX Suggestion] Add "command not found" error message? #69

vyder opened this issue May 5, 2020 · 0 comments

Comments

@vyder
Copy link

vyder commented May 5, 2020

I come from a Ruby background and am used to pry and byebug as my main debuggers, and spent a good 20mins wondering why I couldn't inspect variables with this debugger when stepping/moving worked fine.

I was doing variations of this:

debugger.lua> transitions
debugger.lua> src_state
debugger.lua> print src_state
debugger.lua> locals
debugger.lua> l
	dest_state => "Ready"
	src_state => "Not Ready"
	transitions => {"Not Ready" = {}}

I realize that l prints all the locals out, but I'm wondering how I can inspect individual variables...

And then out of frustration I type in:

debugger.lua> asdfasdf
debugger.lua>

And notice that the prompt doesn't react and then I'm like ohhh when it doesn't understand a command it just pretends like nothing happened.

Cue these attempts:

debugger.lua> pp(transitions)
debugger.lua> p
Error: command 'p' not recognized.
Type 'h' and press return for a command list.
debugger.lua> pp
debugger.lua> h
[.. help output ..]
debugger.lua> p transitions
transitions => {"Not Ready" = {}}

I was expecting the output of p and pp to tell me what arguments they were expecting.

Even more confusing is that when you do type in the right single character command but with the wrong arguments, it says Error: command 'p' not recognized - which is arguably even more misleading 🤣

Anyway. Just throwing my 2 cents in here. I'm still too much of a lua noob to attempt to fix this myself, but if you think it's a worthy addition, I can make an attempt.

Edit: Turned out to be an easy fix - I created a PR.

vyder added a commit to vyder/debugger.lua that referenced this issue May 5, 2020
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

1 participant