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

Document shortcuts #3

Open
rgrannell1 opened this issue Aug 12, 2016 · 3 comments
Open

Document shortcuts #3

rgrannell1 opened this issue Aug 12, 2016 · 3 comments

Comments

@rgrannell1
Copy link
Contributor

I've enjoyed using this module, and it's worked very well for me so far. I haven't figured how to actually navigate through the program using the breakpoint command; the only shortcut I've figured out is that q will exit the program.

Can you document the supported commands for navigating through a program that has reached a breakpoint?

@figueroadavid
Copy link

I realize this is old, but I agree.. having them in the readme would help.
FYI, if you put in a ? at the debug prompt in the middle, it shows you the commands.. (I found out the hard way)..

And BTW - Absolutely fantastic module Kirk! I was trying to figure out how to troubleshoot a module, and none of the standard things I would do were working. Tried this and instant success.

@rgrannell1
Copy link
Contributor Author

I found this too - apparently entering "h" will give back the same information. As a quick overview for other people with the same problem:

  • q: quit.
  • h: list breakpoint help
  • c: continue

@KirkMunro
Copy link
Owner

Wow, I completely missed this thread. Methinks I need to make sure these things show up in my Inbox better.

Anyhow, I agree, more docs are necessary to learn the standard debugger commands. I've just demoed PowerShell debugging at two separate conferences, and have another coming up, and I need to round out the docs for this (and my other) modules. Point very well taken.

For the useful commands, aside from those listed above (h, q, c), I also highly recommend getting to know the following:

  • k: show the call stack
  • l: list the current file (especially useful when remotely debugging and when working in a native shell that has no integrated UI for stepping through scripts/functions); note the from/to optional parameters so that you can control what is listed (e.g. l 1 100 - show lines 1 through 100).
  • s, v, o: step into, step over, step out of -- spend time learning how these work so that you do debugging more efficiently, and note that while the "s" is very tempting as a step command, "v" is probably what you should do by default, saving "s" for those times that you actually want to intentionally step inside of a command you are calling
  • and of course, Enter to repeat the last command (much faster than v,Enter,v,Enter,v,Enter).

I'll work on improving the docs in a future update, as well as updating docs in this GitHub repository.

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

3 participants