Open michaelhogg opened 9 years ago
Hi. Is your fix in any way related to this issue? https://github.com/martomo/SublimeTextXdebug/issues/155
@Mike-NetCode: It looks like it could be related.
Looking at @hollusion's Xdebug log in that issue:
<- step_out -i 14
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="step_out"
transaction_id="14"
status="stopping"
reason="ok">
</response>
<- eval -i 15 -- JHJ1bGVz
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="eval"
transaction_id="15">
<error code="5">
<message>
<![CDATA[
command is not available
]]>
</message>
</error>
</response>
The engine responded to transaction 14 with status="stopping"
.
An eval
command was then sent in transaction 15 with data "$rules"
(Base64-encoded as "JHJ1bGVz
") which looks like a request to evaluate a watch expression. Since the engine had stopped, it responded with error code 5: command is not available
.
I've merged your fixes into my fork: https://github.com/ryanpcmcquen/SublimeTextXdebugPlus
Which I am attempting to get into Package Control: https://github.com/wbond/package_control_channel/pull/7658
A command (such as
run
) is sent to the debugger engine on line 197:The engine could respond with
status="stopping"
. From the DBGP docs:watch_expression()
sends aneval
command to the engine for each watch expression. If the engine's state isstopping
, then it'll probably respond to theeval
commands with:So it's wrong to call
watch_expression()
here without checking the engine's state.watch_expression()
should only be called if the engine's state isbreak
, and in fact the code does this on line 249.