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

Fix problem when restarting right after debugging #10783

Merged
merged 3 commits into from
Jul 13, 2022

Conversation

rchiodo
Copy link
Contributor

@rchiodo rchiodo commented Jul 12, 2022

Fixes #10741

I don't think this was an actual regression, but rather a papercut. Super easy fix though.

@rchiodo rchiodo requested a review from a team as a code owner July 12, 2022 22:09
@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2022

Codecov Report

Merging #10783 (dda78b9) into main (708004b) will decrease coverage by 0%.
The diff coverage is 69%.

❗ Current head dda78b9 differs from pull request most recent head 4289265. Consider uploading reports for the commit 4289265 to get more accurate results

@@          Coverage Diff           @@
##            main   #10783   +/-   ##
======================================
- Coverage     62%      62%   -1%     
======================================
  Files        476      476           
  Lines      33048    33058   +10     
  Branches    5387     5391    +4     
======================================
- Hits       20736    20733    -3     
- Misses     10274    10279    +5     
- Partials    2038     2046    +8     
Impacted Files Coverage Δ
src/kernels/debugger/kernelDebugAdapterBase.ts 76% <56%> (-3%) ⬇️
...active-window/debugger/jupyter/debuggingManager.ts 63% <100%> (+<1%) ⬆️
...tive-window/debugger/jupyter/kernelDebugAdapter.ts 58% <100%> (ø)
src/notebooks/debugger/debuggingManager.ts 53% <100%> (+<1%) ⬆️
src/platform/common/cancellation.ts 64% <0%> (-4%) ⬇️
src/platform/telemetry/telemetry.ts 76% <0%> (-4%) ⬇️
.../kernels/raw/launcher/kernelEnvVarsService.node.ts 68% <0%> (-3%) ⬇️
...form/common/process/pythonExecutionFactory.node.ts 73% <0%> (-3%) ⬇️
src/kernels/raw/session/rawSocket.node.ts 74% <0%> (-2%) ⬇️
...ommon/process/environmentActivationService.node.ts 71% <0%> (-1%) ⬇️
... and 3 more

await this.session.customRequest('disconnect', { restart: false });
}
this.endSession.fire(this.session);
this.disconnected = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should move this property initialization to the very top (just after checking it), else this method disconnect can be called multiple times and we could end up sending multiple disconnect requests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah good point.

Copy link
Contributor

@DonJayamanne DonJayamanne left a comment

Choose a reason for hiding this comment

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

One suggested change to prevent duplicate disconnect requests being sent out

@rchiodo rchiodo merged commit aaf4210 into main Jul 13, 2022
@rchiodo rchiodo deleted the rchiodo/fix_restart_debugging branch July 13, 2022 00:12
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.

No debugger available after restarting kernel
3 participants