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

Poor documentation #30

Open
jimbasquiat opened this issue Feb 25, 2018 · 8 comments
Open

Poor documentation #30

jimbasquiat opened this issue Feb 25, 2018 · 8 comments

Comments

@jimbasquiat
Copy link

jimbasquiat commented Feb 25, 2018

Clear instructions on:

  • How to install the package
  • Where to find the functionalities once installed
  • What each of the functionalities do

should have the precedent in the docs over 'how to write a new backend' (for instance...) IMHO.

@matiasmorant
Copy link
Owner

Very true. Were you able to respond to those questions? How would you feel about writing this for the docs?

@matiasmorant
Copy link
Owner

#8 #7

@jimbasquiat
Copy link
Author

jimbasquiat commented Feb 26, 2018 via email

@matiasmorant
Copy link
Owner

OK I see. I'll be adding this to my todo list. Thanks for the feedback.

@jimbasquiat
Copy link
Author

jimbasquiat commented Feb 26, 2018 via email

@matiasmorant
Copy link
Owner

Enable watcher opens the right panel you can see on the readme

In that panel, there is a section entitled Expressions if you write a Python expression in there, it will be evaluated in the current context when debugging. You can modify these expressions and reevaluate them with reeval expressions

@pdepmcp
Copy link

pdepmcp commented Jul 17, 2018

In my understanding of how it works:
install as a normal sublimetext package (ctrl+shift P -> install package -> python debugger)

You'll find new functionalities in tools->debugger
The toggle watcher command opens a new column on the right side of sublime, divided in three boxes:
variables: containing local and global variables when debugging (empty otherwise)

expression: a box where you can write custom expression and they'll be evaluated in the current context (if debugging, usefull when you are on a breakpoint to check for something that is not shown in the previous box)

breakpoints: the list of breakpoint in your code. Add/remove/toggle them using tool->debugger->toggle breakpoint OR using keyboard shortcuts (ctrl+alt+b) on the highlighted line in the editor.

When using tool->debugger->start debugging a new input fields pops up on the bottom of the sublime screen. It's actually the input field of pdb. Use 'n' to go 1 step forward, 'c' to continue (to next breakpoint or program's end) Other commands should be supported as well, but some don't work (apparently), like p to print the lines before and after current position. Due to some issues on printing pdb result to screen, 'h' command (help), seems to stop debuggin, so you need to remember pdb commands to use it.

@matiasmorant
Copy link
Owner

@pdepmcp I'm glad that you are finding this useful. I will add a few points:

expression: you can modify and re-evaluate expressions when you are stopped on a breakpoint. That's what "reeval expression" is for. The keyboard shortcut for this only works when the cursor is in the expression section.

breakpoints: you can also add/remove breakpoints while debugging by using the 'b' command on the console. Instructions on how to use this command are on the help text.

debugger commands: They are not pdb commands, although most are actually the same. For example, the 'p' command of pdb is not present, since it wouldn't be of any use here (where should it print to? you can already see the current line highlighted and you have the expression and variables tab filling that role). Also the 'b' command was supercharged with more functionality than pdb 'b command': after the line number, you can pass a python slice expression (for example, "b 3 5:12:2" will set a breakpoint on line 3, but the debugger will only stop there the 5th, 7th, 9th and 11th time the breakpoint is reached). You can also pass another expression and the debugger will stop there only if the expression evaluates to true at that moment (for example "b 11 len(apples)>23" will make the debugger stop at line 11 only when len(apples)>23)

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