com php-src: update .phpdbginit with more info/example: .phpdbginit
| From: | Bob Weinand | Date: | Wed, 20 Nov 2013 15:10:00 +0000 |
| Subject: | com php-src: update .phpdbginit with more info/example: .phpdbginit | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74758@lists.php.net to get a copy of this message | ||
Commit: 96ae27eee0960dd1da8c1a7b137d2f297a1f1db4
Author: krakjoe <joe.watkins@live.co.uk> Wed, 20 Nov 2013 15:10:00 +0000
Parents: 734bc6837527600065b5797cd369d4cedfc3657e
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=96ae27eee0960dd1da8c1a7b137d2f297a1f1db4
Log:
update .phpdbginit with more info/example
Changed paths:
M .phpdbginit
Diff:
diff --git a/.phpdbginit b/.phpdbginit
index 5de88c7..10c831b 100644
--- a/.phpdbginit
+++ b/.phpdbginit
@@ -1,26 +1,59 @@
-##############################################
+##########################################################
# .phpdbginit
#
# Lines starting with # are ignored
# Code must start and end with <: and :> respectively
-##############################################
+##########################################################
# Place initialization commands one per line
-##############################################
+##########################################################
# exec sapi/phpdbg/test.php
-##############################################
+##########################################################
# Embedding code in .phpdbginit
-##############################################
+##########################################################
<:
/*
* This embedded PHP is executed at init time
*/
+/*
+* Functions defined and registered by init
+* will persist across cleans
+*/
+
+/*
+function my_debugging_function()
+{
+ var_dump(func_get_args());
+}
+*/
+
/* phpdbg_break(PHPDBG_METHOD, "phpdbg::method"); */
/* phpdbg_break(PHPDBG_FUNC, "my_global_function"); */
/* phpdbg_break(PHPDBG_FILE, "/path/to/file.php:10"); */
:>
-
-##############################################
+##########################################################
# Now carry on initializing phpdbg ...
-##############################################
+##########################################################
+# R my_debugging_function
+
+##########################################################
+# PHP has many functions that might be useful
+# ... you choose ...
+##########################################################
+# R touch
+# R unlink
+# R scandir
+# R glob
+
+##########################################################
+# Remember: *you have access to the shell*
+##########################################################
+# The output of registered function calls is not,
+# by default, very pretty (unless you implement
+# and register a new implementation for phpdbg)
+# The output of shell commands will usually be more
+# readable on the console
+##########################################################
+# TLDR; if you have a good shell, use it ...
+##########################################################