Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Update cell and breakpoints on content changed #162

Closed
jtpio opened this issue Nov 7, 2019 · 0 comments · Fixed by #164
Closed

Update cell and breakpoints on content changed #162

jtpio opened this issue Nov 7, 2019 · 0 comments · Fixed by #164
Assignees
Milestone

Comments

@jtpio
Copy link
Member

jtpio commented Nov 7, 2019

For the debugger to work, we need keep the content of the cell in sync with the kernel. This is because of the hashing mechanism detailed in #49 and #52.

That means that every time a user modifies the content of the cell, we need to send the dumpCell and setBreakpoints requests, for the debugger to be able to break at the next execute_request.

The flow would be something similar to the following:

  • Add a signal connection to activeCell.model.contentChanged.
  • When a user changes the content of the cell, the signal is emitted.
  • Send dumpCell and setBreakpoints via the DebugService, probably behind an ActivityMonitor or Debouncer to avoid firing to many requests.
  • Since the service is responsible for updating the breakpoints, the breakpoints view will refresh itself when a response is received from the kernel and the model changed.

This was also raised in #160. Before the breakpoints model would be directly modified when the number of lines of the cell changes (and the service bypassed).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant