mailgun / godebug

DEPRECATED! https://github.com/derekparker/delve
Apache License 2.0
2.5k stars 107 forks source link

UX improvement: remove ambiguity between commands and variable names #38

Closed jeremyschlatter closed 9 years ago

jeremyschlatter commented 9 years ago

A story

If I want to print the variable a, I type "a". If I want to print the variable b I type "b". If I want to print the variable c I type "c"...

whoops, I just ran the continue command instead of printing my variable.

The problem

godebug lets you print variables by typing their name. But if you build that habit and then want to print a variable with the same name as a godebug command, you will probably run a command you do not intend to, by accident. godebug should either detect the ambiguity or, preferably, not take inputs that can be ambiguous in this way.

The easiest thing is probably to only print variables when the user types the "(p)rint" command.

Questions

What command syntax should we use when godebug is expanded to evaluate full expressions? How do other debuggers handle this? In particular, what does pdb do?

willfaught commented 9 years ago

Agreed, I'm fine with typing "p foo" to print.

jeremyschlatter commented 9 years ago

Resolved in 070b120e3208eb5d847ca73611296a43ea36290d