Skip to content

Fix DBGP emulator handling only one command - #62

Merged
carlos-granados merged 1 commit into
php-debugger:mainfrom
carlos-granados:fix/dbgp-emulator
May 5, 2026
Merged

carlos-granados merged 1 commit into
php-debugger:mainfrom
carlos-granados:fix/dbgp-emulator

Conversation

@carlos-granados

Copy link
Copy Markdown
Collaborator

When I created this emulator, I only tested it with a "commands" file which only contained one command but when I actually tried to use it with more commands I found out that only the first command was passed. Turns out that the doRead() function of the base class always returns null, independently of whether it correctly read some data or not, so the check for the return value always failed 🤦 Turns out that this check is not really needed and checking if the connection has been closed is enough

The explanation is much longer than the fix! 😆

@carlos-granados
carlos-granados force-pushed the fix/dbgp-emulator branch 2 times, most recently from d7843ff to 2987506 Compare April 22, 2026 16:19
@pronskiy
pronskiy self-requested a review May 4, 2026 00:22
@carlos-granados
carlos-granados merged commit 652f436 into php-debugger:main May 5, 2026
14 of 15 checks passed
@carlos-granados
carlos-granados deleted the fix/dbgp-emulator branch May 5, 2026 06:11
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.

2 participants