laike9m / Cyberbrain

Python debugging, redefined.
http://bit.ly/cyberbrain-features
MIT License
2.5k stars 159 forks source link

Multi-frame tracing user interaction #71

Open laike9m opened 3 years ago

laike9m commented 3 years ago

On the backend, frames are stored in a tree

UI interaction:

Picking frames

  1. User clicks on a location in VSC
  2. Extension sends a location to backend
  3. Backend returns the first 5 frames that contain the specified code location, with the callsite location. (In the future we can extend the max number of candidates.)
  4. User picks a frame
  5. The identity of the picked frame is sent to backend
  6. Backend sends back tracing results for the picked frame

Steps 2 ~ 5 won't happen if there's only one frame.

If there's no frame that matches the current location, nothing will happen.

Map tracing result to code TBD. But for now, we should prevent frame selection process from happening (again) if tracing is present and code location didn't go out of the frame's scope.

By default, we should show previous frame + current frame + 1-level frames derived from the current frame. We will let users configure this on extension UI.

laike9m commented 3 years ago

Related https://github.com/laike9m/Cyberbrain/discussions/73