Browse Source

Jump to the cell where execution has stopped

Jeremy Tuloup 5 năm trước cách đây
mục cha
commit
ec972024ad
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/handlers/notebook.ts

+ 2 - 1
src/handlers/notebook.ts

@@ -84,13 +84,14 @@ export class NotebookHandler implements IDisposable {
       return;
     }
 
-    cells.forEach(cell => {
+    cells.forEach((cell, i) => {
       // check the event is for the correct cell
       const code = cell.model.value.text;
       const cellId = this.debuggerService.getCellId(code);
       if (frame.source.path !== cellId) {
         return;
       }
+      notebook.content.activeCellIndex = i;
       CellManager.showCurrentLine(cell, frame);
     });
   }