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

fulfill original requirements and add telemetry for run by line #7133

Closed
Tracked by #5607
DavidKutu opened this issue Aug 14, 2021 · 1 comment
Closed
Tracked by #5607

fulfill original requirements and add telemetry for run by line #7133

DavidKutu opened this issue Aug 14, 2021 · 1 comment
Assignees
Labels
notebook-run-by-line verified Verification succeeded
Milestone

Comments

@DavidKutu
Copy link

DavidKutu commented Aug 14, 2021

  • [In PR] Run by line can be started by clicking on the icon in the cell toolbar or by using the shortcut F10 when in cell edit mode.

  • [Not for MVP] Run by line should start on the line that the cursor is on, no matter where in the line it is. If the cursor is on line 3 and the user hits run by line, the cell should run everything up to line 3 - should run lines 1 and 2 and stop at 3 and wait for user to advance. (new behavior. greazer: Note that since this is a pretty fundamental change in the experience from what we have today, we should be sure to validate that it's not going to cause grief among the existing users of this feature)

  • [Done] When run by line is enabled, line that is about to be run should be highlighted yellow. (How it works today)

  • [Done] When run by line enabled, automatically open the variable explorer. (How it works today)

  • [In PR] User can advance to the next line by clicking the run by line icon in the cell toolbar, or using the keyboard shortcut F10.

  • [In PR] User can run through the rest of the remaining lines of code by using the keyboard shortcut Ctrl + Enter.

  • [this one doesn't make sense, there's no key binding for interrupting. Creating one for a specific case is confusing to me, specially if its the same one for running] User can exit run by line mode by clicking the stop execution to the left of the cell or by using the keyboard shortcut Shift+enter.

  • [Done] If the user exits run by line manually, do not display error in the output regarding interrupt. (new behavior)

  • [Tracked in #6213] When user completes run by line mode (whether they manually quit or finish), do not display "execution time" in the cell status bar. (probably not too much of a concern for MVP?)

  • [Same as above] Execution count should be updated and green check mark shown if at least one line is run. If user begins run by line on the first line of the cell, but does not advance to the next and interrupts/stops run by line, the execution count should not updated and green check mark should not be shown. (greazer: basically, unless the user runs the entire cell, the checkmark should not appear, right?)

Special Case:

  • [Tracked in Have an event for changing kernels, or don't allow if a debugging session is active #7180] If the user tries to switch the kernel during run by line, run by line should exit and be treated as manual interrupt. Do not display error regarding interrupt. Execution count should not be updated, green check mark should not be shown. (greazer: we intentially don't want to just disable switching kernel? Why not?)

  • [This one is going to be hard to pull off] Nice to have but believe this was not possible at the time with webview: If a user edits a line in a cell that has not yet been reached, run the updated code. If a line of code is deleted that is not yet reached, do not run old code. Go to next available line of code. (greazer: This behavior is referred to as "Edit and Continue". It's not supported by the underlying debugger infrastructure yet).

@DavidKutu
Copy link
Author

DavidKutu commented Aug 25, 2021

FULL ORIGINAL REQUIREMENTS:
Add Run by Line to Native Notebooks. Some behavior change given QP findings.

Experience:

  • Add icon to cell toolbar in the left-most position: Run by Line vscode-codicons#52 (comment)
    image

  • Run by line can be started by clicking on the icon in the cell toolbar or by using the shortcut F10 when in cell edit mode.

  • Run by line should start on the line that the cursor is on, no matter where in the line it is. If the cursor is on line 3 and the user hits run by line, the cell should run everything up to line 3 - should run lines 1 and 2 and stop at 3 and wait for user to advance. (new behavior. greazer: Note that since this is a pretty fundamental change in the experience from what we have today, we should be sure to validate that it's not going to cause grief among the existing users of this feature)

  • When run by line is enabled, line that is about to be run should be highlighted yellow. (How it works today)

  • When run by line enabled, automatically open the variable explorer. (How it works today)

  • User can advance to the next line by clicking the run by line icon in the cell toolbar, or using the keyboard shortcut Shift + Enter. (greazer: This should be the F10 behavior, not Shift+enter)

  • User can run through the rest of the remaining lines of code by using the keyboard shortcut Ctrl + Enter.

  • User can exit run by line mode by clicking the stop execution to the left of the cell or by using the keyboard shortcut F10. (Requires VS Code for stop execution to left of cell? greazer: per the above, I think Shift+Enter should be the keystroke here. Basically swap F10 and Shift+enter)

  • If the user exits run by line manually, do not display error in the output regarding interrupt. (new behavior)

  • When user completes run by line mode (whether they manually quit or finish), do not display "execution time" in the cell status bar. (probably not too much of a concern for MVP?)

  • Execution count should be updated and green check mark shown if at least one line is run. If user begins run by line on the first line of the cell, but does not advance to the next and interrupts/stops run by line, the execution count should not updated and green check mark should not be shown. (greazer: basically, unless the user runs the entire cell, the checkmark should not appear, right?)

Special Case:

  • If the user tries to switch the kernel during run by line, run by line should exit and be treated as manual interrupt. Do not display error regarding interrupt. Execution count should not be updated, green check mark should not be shown. (greazer: we intentially don't want to just disable switching kernel? Why not?)

Nice to have but believe this was not possible at the time with webview: If a user edits a line in a cell that has not yet been reached, run the updated code. If a line of code is deleted that is not yet reached, do not run old code. Go to next available line of code. (greazer: This behavior is referred to as "Edit and Continue". It's not supported by the underlying debugger infrastructure yet).

Ex.

Imagine run by line is active and on line 1. When I started run by line, line 2 had the code x = 4 but I change it to x = 5 before I advance from line 1 to line 2. When I eventually advance through lines 2 and 3, would be nice to have line 3 print the value 5, not 4.

1 print("hi")
2 x = 4 -> x = 5
3 print(x)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2021
@DonJayamanne DonJayamanne added the verified Verification succeeded label Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
notebook-run-by-line verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants