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

Disconnect form debugger if user deletes cell while debugging #7666

Merged
merged 3 commits into from
Sep 27, 2021

Conversation

DavidKutu
Copy link

@DavidKutu DavidKutu commented Sep 24, 2021

For #7631

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • Title summarizes what is changing.
  • Has a news entry file (remember to thank yourself!).
  • Appropriate comments and documentation strings in the code.
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated.
  • Test plan is updated as appropriate.
  • package-lock.json has been regenerated by running npm install (if dependencies have changed).

@DavidKutu DavidKutu requested a review from a team as a code owner September 24, 2021 22:50
@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2021

Codecov Report

Merging #7666 (7239e16) into main (a8aeaac) will increase coverage by 0%.
The diff coverage is 37%.

@@          Coverage Diff          @@
##            main   #7666   +/-   ##
=====================================
  Coverage     68%     68%           
=====================================
  Files        363     363           
  Lines      22552   22562   +10     
  Branches    3432    3432           
=====================================
+ Hits       15467   15498   +31     
+ Misses      5747    5730   -17     
+ Partials    1338    1334    -4     
Impacted Files Coverage Δ
src/client/debugger/jupyter/kernelDebugAdapter.ts 79% <37%> (-3%) ⬇️
...datascience/editor-integration/codelensprovider.ts 69% <0%> (-2%) ⬇️
src/client/datascience/jupyter/jupyterNotebook.ts 25% <0%> (-1%) ⬇️
src/client/datascience/commands/commandRegistry.ts 35% <0%> (-1%) ⬇️
src/client/datascience/webviews/webviewHost.ts 77% <0%> (ø)
src/client/datascience/constants.ts 99% <0%> (+<1%) ⬆️
...client/datascience/commands/activeEditorContext.ts 91% <0%> (+<1%) ⬆️
...lient/datascience/variablesView/notebookWatcher.ts 88% <0%> (+1%) ⬆️
src/client/datascience/jupyter/kernels/kernel.ts 75% <0%> (+2%) ⬆️
...ence/editor-integration/cellHashProviderFactory.ts 100% <0%> (+2%) ⬆️
... and 2 more

(e: NotebookCellsChangeEvent) => {
e.changes.forEach((change) => {
change.deletedItems.forEach((cell: NotebookCell) => {
if (cell.document.uri === this.debugCellUri) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than storing the debugCellUri, you might as well store the reference to the cell object.
Then just compare if (cell === this.debugCell)
that will be better (else you end up comparing uris everytime).

@DavidKutu DavidKutu merged commit a8ce435 into main Sep 27, 2021
@DavidKutu DavidKutu deleted the david/RBLdeleteCell branch September 27, 2021 19:03
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

Successfully merging this pull request may close these issues.

3 participants