DebugPx icon indicating copy to clipboard operation
DebugPx copied to clipboard

Document shortcuts

Open rgrannell1 opened this issue 8 years ago • 3 comments

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?

rgrannell1 avatar Aug 12 '16 16:08 rgrannell1

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.

figueroadavid avatar Dec 22 '16 16:12 figueroadavid

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

rgrannell1 avatar Dec 25 '16 18:12 rgrannell1

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.

KirkMunro avatar May 11 '17 01:05 KirkMunro