Skip to content

Commit

Permalink
fix: do not send continue events (#307)
Browse files Browse the repository at this point in the history
A debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. 'launch' or 'continue'.
It is only necessary to send a 'continued' event if there was no previous request that implied this.

Note: there is still the problem that it will seem to "hang" when you continue and the PHP code takes a while to run, #308 will fix that.

Fixes #301
  • Loading branch information
jonyo authored and felixfbecker committed Sep 21, 2018
1 parent 7fa2d28 commit 047777b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
4 changes: 0 additions & 4 deletions src/phpDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,6 @@ class PhpDebugSession extends vscode.DebugSession {
})
connection.on('error', disposeConnection)
connection.on('close', disposeConnection)
connection.on('before-execute-command', () => {
// It is about to start executing PHP code
this.sendEvent(new vscode.ContinuedEvent(connection.id))
})
await connection.waitForInitPacket()

// override features from launch.json
Expand Down
5 changes: 0 additions & 5 deletions src/xdebugConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -679,11 +679,6 @@ export class Connection extends DbgpConnection {
const data = iconv.encode(commandString, ENCODING)
this._pendingCommands.set(transactionId, command)
this._pendingExecuteCommand = command.isExecuteCommand
if (this._pendingExecuteCommand) {
// Since PHP execution commands block anything on the connection until it is
// done executing, emit that the connection is about to go into such a locked state
this.emit('before-execute-command')
}
await this.write(data)
}

Expand Down

0 comments on commit 047777b

Please sign in to comment.