-
Notifications
You must be signed in to change notification settings - Fork 6
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
Comments
Very true. Were you able to respond to those questions? How would you feel about writing this for the docs? |
No I wasn't able to guess what the enable watcher and reeval expression do
- I'm quite new to python.
2018-02-26 13:27 GMT+00:00 matias morant <notifications@github.com>:
… #8 <#8>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS26Jn7kqvGb6623PoBAzmvJH5iqnuY_ks5tYrE8gaJpZM4SSStW>
.
|
OK I see. I'll be adding this to my todo list. Thanks for the feedback. |
Thanks, but can you just briefly explain here what those 2 things are
doing?
2018-02-26 15:19 GMT+00:00 matias morant <notifications@github.com>:
… OK I see. I'll be adding this to my todo list. Thanks for the feedback.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS26JhhlJ-4V_Xb5YOZUIt8dQij5DwmEks5tYstmgaJpZM4SSStW>
.
|
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 |
In my understanding of how it works: You'll find new functionalities in tools->debugger 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. |
@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) |
Clear instructions on:
should have the precedent in the docs over 'how to write a new backend' (for instance...) IMHO.
The text was updated successfully, but these errors were encountered: