You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having to constantly press the p command is getting tiresome. I would like to suggest a couple of features:
automatically execute a number of commands after a breakpoint. Commands could be semicolon separated. So like this:
_ = "breakpoint; p myInt; n; p myInt; c"
Which would cause the "myInt" variable to be printed, the next line to be executed, the "myInt" variable to be printed again, and then the continue command.
Set a mode so that the value of all local variables are automatically printed after a breakpoint, or during stepping.
The text was updated successfully, but these errors were encountered:
Excellent idea! I might take this feature to implement in coming weeks/months.
I had a similar idea and went through issues of this project, to see if somebody already came up with something similar and I found this.
My idea was to have some json file where you define your watches. Something like this:
In help menu you would get something along the lines:
-> _ = "breakpoint"
(godebug) h
Commands:
(h) help: Print this help.
(n) next: Run the next line.
(s) step: Run for one step.
(c) continue: Run until the next breakpoint.
(l) list: Show the current line in context of the code around it.
(p) print <expression>: Print a variable or any other Go expression.
(q) quit: Exit the program. Uses os.Exit; deferred functions are not run.
**(a) print variable group**
**(b) print variable group**
Commands may be given by their full name or by their parenthesized abbreviation.
Pressing enter without typing anything repeats the previous command.
But now, I like your idea more! This way you don't have to maintain an external file, no additional command line parameter for file path.
Having to constantly press the p command is getting tiresome. I would like to suggest a couple of features:
Which would cause the "myInt" variable to be printed, the next line to be executed, the "myInt" variable to be printed again, and then the continue command.
The text was updated successfully, but these errors were encountered: