-
Notifications
You must be signed in to change notification settings - Fork 300
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
avoid unnecessary scopes and variables calls #7313
Conversation
Codecov Report
@@ Coverage Diff @@
## main #7313 +/- ##
======================================
Coverage 62% 63%
======================================
Files 360 360
Lines 22539 22551 +12
Branches 3404 3412 +8
======================================
+ Hits 14080 14209 +129
+ Misses 7284 7155 -129
- Partials 1175 1187 +12
|
@@ -377,7 +377,11 @@ export class KernelDebugAdapter implements DebugAdapter, IKernelDebugAdapter, ID | |||
// Here we catch the stackTrace response and we use its id to send a scope message | |||
if ((message as DebugProtocol.StackTraceResponse).command === 'stackTrace') { | |||
(message as DebugProtocol.StackTraceResponse).body.stackFrames.forEach((sf) => { | |||
this.scopes(sf.id); | |||
// Only call scopes (and variables) if we are stopped on the cell we are executing | |||
const cell = this.notebookDocument.cellAt(this.configuration.__cellIndex!); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this.configuration.__cellIndex
always guaranteed to be defined here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not in all cases, I'll use the notebook URI
@@ -377,7 +377,11 @@ export class KernelDebugAdapter implements DebugAdapter, IKernelDebugAdapter, ID | |||
// Here we catch the stackTrace response and we use its id to send a scope message | |||
if ((message as DebugProtocol.StackTraceResponse).command === 'stackTrace') { | |||
(message as DebugProtocol.StackTraceResponse).body.stackFrames.forEach((sf) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could even be optimized more - this will send the request for the cell's frame even if it is not the first frame in the stack, like when you have stepped into another cell. But it won't send it for other frames, which is good.
For #7246
package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed).