Protocol/Script.to.Client

backtrace

NAME. 

backtrace

ARGS. 

  • backtrace - backtrace in the form of a serialized array

DESCRIPTION. 

Informs the client of the current backtrace

SEE ALSO. 

http://php.net/serialize

commandme

NAME. 

commandme

ARGS. 

  • filename - current file

  • line - current line of execution

DESCRIPTION. 

tells the client the script is halted (For any reason. Can also be during 'trace') and needs to be updated. The client should update it's views and request watches, and backtrace. Then either reply with a "wait" or "next" command.

SEE ALSO. 

wait, next, sendwatches, sendbacktrace

conditionalbreak

NAME. 

conditionalbreak

ARGS. 

none

DESCRIPTION. 

Execution is halted due to a conditional breakpoint and the client should set its internal execution status to paused.

The status of all conditional breakpoints will follow.

SEE ALSO. 

end

NAME. 

end

ARGS. 

  • filename - name of the file that reached the end

DESCRIPTION. 

Tells the client the end of an include file was reached.

The client should forward this information to the user in verbose mode.

SEE ALSO. 

error

NAME. 

error

ARGS. 

  • filename - file where the error occurred

  • line - code line where the error occurred

  • errnum - php error number of the error

  • errmsg - php error message of the error

DESCRIPTION. 

Tells the client an error occurred in the script and that execution is halted because of it. Which kind of errors halts execution depends on the current settings.

the arguments are currently separated by colons

forcebreak

NAME. 

forcebreak

ARGS. 

none

DESCRIPTION. 

This command tells the client execution is halted due to a forced (ie, hardcoded \* STOP *\) breakpoint.

The client should set its internal execution status to paused.

SEE ALSO. 

getrunmode

NAME. 

getrunmode

ARGS. 

none

DESCRIPTION. 

Upon receiving this command, the client should send the current run mode (pause, run, trace) as well as current error mask (seterrormask)

This is part of the initial communication when a script started to execute and it needs to know what run mode the user has requested as well as what errors to halt on.

SEE ALSO. 

pause, run, trace, seterrormask

initialize

NAME. 

initialize

ARGS. 

  • filename - filename of the script entered

  • checksum - checksum of the script entered (using this, the the client can tell if it needs to refresh it's source view)

DESCRIPTION. 

initialize tells the client a new script was entered and needs to be displayed. The client can then chose to load the script from disk or request it's sourcecode from Gubed.

The client should reply with either a 'havesource' or a 'sendsource' command, to indicate if it needs the source sent or not.

parsefailed

NAME. 

parsefailed

ARGS. 

  • filename - name of the file that failed to parse.

DESCRIPTION. 

Tells the client and execution was halted (ie killed) because of a parse error.

This either means there are errors in the php code, or that Gubed's parser was unable to parse the file(s).

SEE ALSO. 

parsetime

NAME. 

parsetime

ARGS. 

  • filename - what file was parsed

  • time - parse time in ms

DESCRIPTION. 

This command is informational only and tells the client how long time it took to parse a file.

Should be displayed in verbose mode only.

SEE ALSO. 

processouput

NAME. 

processoutput

ARGS. 

  • output - what output a phpprocess command generated

DESCRIPTION. 

Returns the output of a phpprocess command previously sent.

SEE ALSO. 

protocolversion

NAME. 

protocolversion

ARGS. 

  • version - what protocol version the script uses

DESCRIPTION. 

To make sure the client and the script speaks the same language, the scripts tells the client what version of the protocol it's using. The client should compare this to it's own internal version and kill the script if they do not match.

SEE ALSO. 

sendbreakpoints

NAME. 

sendbreakpoints

ARGS. 

none

DESCRIPTION. 

Tells the client the script needs to know about all breakpoints the client knows of. Usually takes place when a new debugging session starts.

The client should respond by sending all breakpoints and conditional breakpoints one by one.

SEE ALSO. 

breakpoint, conditionalbreakpoint

sentwatches

NAME. 

sentwatches

ARGS. 

key - id key

DESCRIPTION. 

Tells the client all watches are sent, in case it needs to do cleaning up or similar.

SEE ALSO. 

watch

setactiveline

NAME. 

setactiveline

ARGS. 

  • filename - current file

  • line - current line of exection

  • mode - tells the client what mode its urrently in: pause, run or trace (optional)

DESCRIPTION. 

Tells the client the current file and line of execution

SEE ALSO. 

showcondition

NAME. 

showcondition

ARGS. 

  • type - either "change" or "true", if it is a break on changed expression or when expression is true

  • filename - an optional filename and halting will only occur if execution is currently in that file

  • class - only break if the condition is true and in a method of an object of this class

  • function - only break if the condition is true and in a function name like this

  • expression - what expression to evaluate, for example ($a == 12)

  • value - what value the expression currently evaluates to

DESCRIPTION. 

Tells the client about the condition (value) of a conditional breakpoint expression.

SEE ALSO. 

source

NAME. 

source

ARGS. 

  • filename - the filename of the sent source

  • sourcecode - the sourcecode of the file

DESCRIPTION. 

This commands sends the sourcecode of a file to the client.

SEE ALSO. 

sendsource

status

NAME. 

status

ARGS. 

  • message - clear text message to be displayed

  • args - number of args in the message string (%X%)

  • arg1 - first arg to replace %1%

  • argX - etc

DESCRIPTION. 

A message from Gubed to the user. In interntionalizationable english. String can hold placeholders like %1% ... %X% that will be replaces by arg1 ... argX

SEE ALSO. 

variable

NAME. 

variable

ARGS. 

  • variable - contents of a php variable that was requested

DESCRIPTION. 

This command tells the client the value of a variable.

The data comes in PHP's serialized form, see http://php.net/serialize

SEE ALSO. 

http://php.net/serialize

watch

NAME. 

watch

ARGS. 

  • variable - contents of a php variable that was on the watch list, in serialized form

DESCRIPTION. 

This command tells the client the contents of a variable on the watch list so that the ui can be updated to reflect the changes.

The variable comes in PHP's serialized form, see http://php.net/serialize

SEE ALSO. 

variable, http://php.net/serialize