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: remove current execution position when performing stop or continue dbgp operation. #367

Merged
merged 2 commits into from
Feb 2, 2021

Conversation

zobo
Copy link
Contributor

@zobo zobo commented Jul 15, 2019

When the IDE requests a continue operation (step in, out, over, continue) it expects a Response and will remove the current execution position. With XDebug/DBGp the TCP connection will not send a response until another stop condition is encountered this may take an arbitrary amount of time.
This change fixes this by doing some basic validation (is the threadId valid) and then sends a response before executing the continuation command.

Closes #358

@codecov
Copy link

codecov bot commented Dec 6, 2019

Codecov Report

Merging #367 into master will increase coverage by 0.27%.
The diff coverage is 22.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #367      +/-   ##
==========================================
+ Coverage   70.11%   70.39%   +0.27%     
==========================================
  Files           5        5              
  Lines        1014     1010       -4     
  Branches      162      161       -1     
==========================================
  Hits          711      711              
+ Misses        303      299       -4
Impacted Files Coverage Δ
src/phpDebug.ts 67.48% <22.22%> (+0.55%) ⬆️

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 c7280b6...38f0ed6. Read the comment docs.

@felixfbecker felixfbecker changed the base branch from master to main December 21, 2020 20:20
When the IDE requests a continue operation (step in, out, over, continue) it expects a Response and will remove the current execution position. With XDebug/DBGp the TCP connection will not send a response until another stop condition is encountered this may take an arbitrary amount of time.
This change fixes this by doing some basic validation (is the threadId valid) and then sends a response before executing the continuation command.

Closes xdebug#358
@zobo zobo changed the title Fixes stopped indicator when performing stop or continue. fix: remove current execution position when performing stop or continue dbgp operation. Jan 2, 2021
@zobo
Copy link
Contributor Author

zobo commented Jan 2, 2021

I rebased the code to latest main and fixed the title to pass all checks.
The PR also contains a different way to handle possible missing thread ID error. This way the error will, besides being shown as a toast in vscode, also be logged in the Debug console.

Handle them, where possible, with sendErrorResponse and OutputEvent in other cases.
@codecov-io
Copy link

codecov-io commented Jan 26, 2021

Codecov Report

Merging #367 (0b65485) into main (d8921aa) will increase coverage by 0.09%.
The diff coverage is 20.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #367      +/-   ##
==========================================
+ Coverage   66.63%   66.72%   +0.09%     
==========================================
  Files           6        6              
  Lines        1070     1070              
  Branches      172      168       -4     
==========================================
+ Hits          713      714       +1     
+ Misses        357      356       -1     
Impacted Files Coverage Δ
src/phpDebug.ts 66.93% <20.68%> (+0.20%) ⬆️

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 d8921aa...0b65485. Read the comment docs.

@zobo zobo merged commit 1f3b377 into xdebug:main Feb 2, 2021
@github-actions
Copy link

github-actions bot commented Feb 2, 2021

🎉 This PR is included in version 1.14.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@marciogaleno
Copy link

marciogaleno commented Feb 2, 2021

This update caused a problem when running the debug. When I run the debug it is closed automatically. I have already uninstalled and installed the plugin and also vscode, but the problem persists.

GIF-210202_171515

@zobo
Copy link
Contributor Author

zobo commented Feb 2, 2021

Bug came in with previous commits. Was fixed in 1.14.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Remove stopped indicator
4 participants