Pull to refresh

Comments 6

спасибо за интересную статью, обязательно посмотрю на этот инструмент.
Интересует вопрос производительности, если с xdebug она падает почти в два раза, то с phpdbg, как обстоят дела?
Не падает вроде бы, просто своего рода shell-оболочка.
Инструмент интересный. Спасибо что подсказали как им пользоваться (а то давно видал что есть такая штука, но как-то пользоваться не пробовал). А теперь вопрос. Этот инструмент годен только для дебага именно каких-то «независимых функций»? Его можно использовать для дебага приложения?

Т.к. в своей практике очень редко приходится дебажить какие-то независимые функции (обычно они достаточно маленькие и в них и без дебага все понятно.
Для всего приложения нет, он больше для отладки отдельного скрипта, например, библиотеки в виде классов. По крайней мере я этой особенности не увидел. Можно в нем поднимать сервер и делать удаленную отладку.
Удобней тем, что можно ту же точку останова делать не просто по номеру строки или наименованию, а с использованием условия breakpoint-а.
prompt> help aliases
Below are the aliased, short versions of all supported commands
 e     exec                  set execution context
 s     step                  step through execution
 c     continue              continue execution
 r     run                   attempt execution
 u     until                 continue past the current line
 F     finish                continue past the end of the stack
 L     leave                 continue until the end of the stack
 p     print                 print something
 p e   print exec            print out the instructions in the main execution context
 p o   print opline          print out the instruction in the current opline
 p c   print class           print out the instructions in the specified class
 p m   print method          print out the instructions in the specified method
 p f   print func            print out the instructions in the specified function
 p s   print stack           print out the instructions in the current stack
 b     break                 set breakpoint
 b @   break at              specify breakpoint by location and condition
 b ~   break del             delete breakpoint by identifier number
 t     back                  show trace
 f     frame                 switch to a frame
 l     list                  lists some code
 l l   list lines            lists the specified lines
 l c   list class            lists the specified class
 l m   list method           lists the specified method
 l f   list func             lists the specified function
 i     info                  displays some informations
 i b   info break            show breakpoints
 i F   info files            show included files
 i c   info classes          show loaded classes
 i f   info funcs            show loaded classes
 i e   info error            show last error
 i d   info constants        show user defined constants
 i v   info vars             show active variables
 i g   info globals          show superglobals
 i l   info literal          show active literal constants
 i m   info memory           show memory manager stats
 X     clean                 clean the execution environment
 C     clear                 clear breakpoints
 S     set                   set phpdbg configuration
 S p   set prompt            usage: set prompt [<string>]
 S P   set pagination        usage: set pagination [<on|off>]
 S c   set color             usage: set color  <element> <color>
 S C   set colors            usage: set colors [<on|off>]
 S O   set oplog             usage: set oplog  [<output>]
 S b   set break             usage: set break id [<on|off>]
 S B   set breaks            usage: set breaks [<on|off>]
 S q   set quiet             usage: set quiet [<on|off>]
 S s   set stepping          usage: set stepping [<line|op>]
 S r   set refcount          usage: set refcount [<on|off>]
 S l   set lines             usage: set lines [<number>]
 R     register              register a function
 <     source                execute a phpdbginit
 >     export                export breaks to a .phpdbginit script
 q     quit                  exit phpdbg
 W     wait                  wait for other process
 w     watch                 set watchpoint
 w a   watch array           create watchpoint on an array
 w d   watch delete          delete watchpoint
 w r   watch recursive       create recursive watchpoints
 n     next                  step over next line
 E     eol                   set EOL
 h     help                  show help menu

 h a   help aliases          show alias list


То есть инструмент, по быстрому проверить код логики.
UFO just landed and posted this here
Sign up to leave a comment.

Articles