Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix a bunch of debugger issues #10572

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

Merged
merged 3 commits into from
Mar 16, 2020
Merged

Fix a bunch of debugger issues #10572

merged 3 commits into from
Mar 16, 2020

Conversation

rchiodo
Copy link

@rchiodo rchiodo commented Mar 14, 2020

For #10395, #10396, #10206

@rchiodo rchiodo self-assigned this Mar 14, 2020
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

@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.

Not sure what we have fixed, looks more like a refactor to me.

}
// Make sure the last line with actual content ends with a linefeed
if (!lastLine.endsWith('\n') && lastLine.length > 0) {
stripped[stripped.length - 1] = `${lastLine}\n`;
if (!stripped[lastLinePos].endsWith('\n') && stripped[lastLinePos].length > 0) {

Choose a reason for hiding this comment

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

This is the only fix I can see, rest look like refactoring.

lastLine = stripped[stripped.length - 1];
let lastLinePos = stripped.length - 1;
let nextToLastLinePos = stripped.length - 2;
while (nextToLastLinePos > 0) {
Copy link
Author

Choose a reason for hiding this comment

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

This fixes #10396


// Call the internal method.
return this.submitCode(code, file, line);
return this.addOrDebugCode(code, file, line, false);
Copy link
Author

Choose a reason for hiding this comment

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

addOrDebugCode [](start = 20, length = 14)

This fixes #10395 because it 'waits' for the window to show before adding the code.

@@ -208,7 +217,7 @@ export class HostJupyterServer extends LiveShareParticipantHost(JupyterServerBas
disposableRegistry,
this,
info,
loggers,
serviceContainer.getAll<INotebookExecutionLogger>(INotebookExecutionLogger),
Copy link
Author

Choose a reason for hiding this comment

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

getAll [](start = 33, length = 6)

This fixes #10206 because it generates new loggers for each notebook instead of having a single set for all.

Copy link

@DonJayamanne DonJayamanne Mar 14, 2020

Choose a reason for hiding this comment

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

This helps a lot, eg. tomorrow one can look at a PR and understand the need for the change.. (e.g. it wasn't obvious to me). Thanks

@codecov-io
Copy link

codecov-io commented Mar 14, 2020

Codecov Report

Merging #10572 into master will decrease coverage by 0.01%.
The diff coverage is 30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10572      +/-   ##
==========================================
- Coverage   60.79%   60.77%   -0.02%     
==========================================
  Files         579      579              
  Lines       31403    31412       +9     
  Branches     4469     4469              
==========================================
  Hits        19091    19091              
- Misses      11342    11348       +6     
- Partials      970      973       +3
Impacted Files Coverage Δ
...atascience/jupyter/liveshare/guestJupyterServer.ts 11.76% <ø> (ø) ⬆️
src/client/datascience/jupyter/jupyterNotebook.ts 4.49% <0%> (ø) ⬆️
...datascience/jupyter/liveshare/hostJupyterServer.ts 11.4% <0%> (+0.78%) ⬆️
src/client/datascience/jupyter/jupyterServer.ts 7.36% <0%> (ø) ⬆️
...atascience/interactive-window/interactiveWindow.ts 16.56% <0%> (-0.22%) ⬇️
.../datascience/interactive-common/interactiveBase.ts 5.64% <0%> (ø) ⬆️
...client/datascience/jupyter/jupyterServerWrapper.ts 33.33% <100%> (+1.51%) ⬆️
...datascience/editor-integration/cellhashprovider.ts 70.86% <58.33%> (-0.18%) ⬇️
src/datascience-ui/react-common/arePathsSame.ts 75% <0%> (-12.5%) ⬇️
src/client/common/utils/platform.ts 64.7% <0%> (-11.77%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14aff02...e3605bc. Read the comment docs.

@rchiodo rchiodo merged commit 324824a into master Mar 16, 2020
@rchiodo rchiodo deleted the rchiodo/debugger_with_notebook branch March 16, 2020 16:15
DonJayamanne added a commit that referenced this pull request Mar 17, 2020
* master:
  Move redux logging to a different file (#10605)
  Ensure local host only if connection not available (#10600)
  Fix a bunch of debugger issues (#10572)
  Bump acorn from 6.0.0 to 6.4.1 (#10570)
  Resize plot to fit within pdf page (#10547)
  Update dev build instructions to mention "python.insidersChannel"
  Install the ZMQ prebuilt binaries and verify ZMQ works on startup (#10551)
@lock lock bot locked as resolved and limited conversation to collaborators Mar 27, 2020
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 this pull request may close these issues.

5 participants