Skip to content

fix: remove current execution position when performing stop or continue dbgp operation. - #367

Merged
zobo merged 2 commits into
xdebug:mainfrom
zobo:fix-stopped-indicator
Feb 2, 2021
Merged

fix: remove current execution position when performing stop or continue dbgp operation.#367
zobo merged 2 commits into
xdebug:mainfrom
zobo:fix-stopped-indicator

Conversation

@zobo

@zobo zobo commented Jul 15, 2019

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Dec 6, 2019

Copy link
Copy Markdown

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.

@zobo
zobo force-pushed the fix-stopped-indicator branch from c702cb1 to 38f0ed6 Compare December 6, 2019 14:19
@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 force-pushed the fix-stopped-indicator branch from 38f0ed6 to 37124d4 Compare January 2, 2021 13:08
@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

zobo commented Jan 2, 2021

Copy link
Copy Markdown
Contributor Author

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.

Comment thread src/phpDebug.ts
Handle them, where possible, with sendErrorResponse and OutputEvent in other cases.
@codecov-io

codecov-io commented Jan 26, 2021

Copy link
Copy Markdown

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

github-actions Bot commented Feb 2, 2021

Copy link
Copy Markdown

🎉 This PR is included in version 1.14.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@marciogaleno

marciogaleno commented Feb 2, 2021

Copy link
Copy Markdown

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

zobo commented Feb 2, 2021

Copy link
Copy Markdown
Contributor Author

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