com presentations: Debugging talk for ZendCon: slides/xdebug/phpdbg.webm slides/xdebug/phpdbg.xml slides/xdebug/restaurant-end-universe.jpg slides/xdebug/vld-path-3-code.xml slides/xdebug/vld-path-3-output.xml slides/xdebug/vld-path-3-paths.png slides/xdebug/vld-path-3-paths.xml slides/xdebug/vld-path-4-code.xml slides/xdebug/vld-path-4-output.xml xdebug-zendcon14.xml
[email protected] (Derick Rethans)
| Newsgroups | php.pres |
|---|---|
| Message-ID | <[email protected]> |
Commit: b0b2238c5d5cfbdeda441e6424485f9c3f89aee4 Author: Derick Rethans <[email protected]> Wed, 15 Oct 2014 22:03:44 +0100 Parents: e268911f6c942b70b5082c21d0feed9783667f51 Branches: master Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=b0b2238c5d5cfbdeda441e6424485f9c3f89aee4 Log: Debugging talk for ZendCon Changed paths: M slides/xdebug/phpdbg.webm M slides/xdebug/phpdbg.xml M slides/xdebug/restaurant-end-universe.jpg M slides/xdebug/vld-path-3-code.xml M slides/xdebug/vld-path-3-output.xml M slides/xdebug/vld-path-3-paths.png M slides/xdebug/vld-path-3-paths.xml A slides/xdebug/vld-path-4-code.xml A slides/xdebug/vld-path-4-output.xml A xdebug-zendcon14.xml
diff_b0b2238c5d5cfbdeda441e6424485f9c3f89aee4.txt
(text/plain, 7.9 KB)
diff --git a/slides/xdebug/phpdbg.webm b/slides/xdebug/phpdbg.webm
index 44ce3ec..58ae6a3 100644
Binary files a/slides/xdebug/phpdbg.webm and b/slides/xdebug/phpdbg.webm differ
diff --git a/slides/xdebug/phpdbg.xml b/slides/xdebug/phpdbg.xml
index 70c6986..25a3993 100644
--- a/slides/xdebug/phpdbg.xml
+++ b/slides/xdebug/phpdbg.xml
@@ -6,7 +6,7 @@
<bullet>it takes itself very serious:
<blurb>~40:0 vote confirms the awesomeness.~</blurb>
</bullet>
- <bullet>It does some things that Xdebug does, but not quite as good</bullet>
- <bullet>It does some things that VLD does, but not quite as good</bullet>
+ <bullet>It does some single-step debugging</bullet>
+ <bullet>It does some opcode analysis</bullet>
</list>
</slide>
diff --git a/slides/xdebug/restaurant-end-universe.jpg b/slides/xdebug/restaurant-end-universe.jpg
index 0fc91c5..cfbe9bb 100644
Binary files a/slides/xdebug/restaurant-end-universe.jpg and b/slides/xdebug/restaurant-end-universe.jpg differ
diff --git a/slides/xdebug/vld-path-3-code.xml b/slides/xdebug/vld-path-3-code.xml
index efb9530..15614aa 100644
--- a/slides/xdebug/vld-path-3-code.xml
+++ b/slides/xdebug/vld-path-3-code.xml
@@ -1,24 +1,26 @@
-<slide>
-<title>Xdebug code coverage</title>
+<slide style="future">
+<title>Xdebug branch coverage</title>
<example>
<![CDATA[
---TEST--
-Test for bug #1034: path coverage
---FILE--
<?php
include 'dump-branch-coverage.inc';
+include 'test.php';
-xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE | XDEBUG_CC_BRANCH_CHECK);
+xdebug_start_code_coverage(
+ XDEBUG_CC_UNUSED |
+ XDEBUG_CC_DEAD_CODE |
+ XDEBUG_CC_BRANCH_CHECK // ← new magic sauce
+);
-include 'bug01034-004.inc';
+ifthenelse( true, false );
+ifthenelse( false, true );
xdebug_stop_code_coverage(false);
+
$c = xdebug_get_code_coverage();
dump_branch_coverage($c);
?>
---EXPECTF--
-…
]]>
</example>
</slide>
diff --git a/slides/xdebug/vld-path-3-output.xml b/slides/xdebug/vld-path-3-output.xml
index 8662824..c01810f 100644
--- a/slides/xdebug/vld-path-3-output.xml
+++ b/slides/xdebug/vld-path-3-output.xml
@@ -1,27 +1,19 @@
-<slide>
-<title>Xdebug code output</title>
+<slide style="future">
+<title>Xdebug branch coverage output</title>
<example>
+A HIT
ifthenelse
- branches
- - 00; OP: 00-04; line: 12-14 HIT; out1: 05 HIT; out2: 08 HIT
- - 05; OP: 05-07; line: 15-16 HIT; out1: 08 HIT
- - 08; OP: 08-09; line: 17-17 HIT; out1: 10 HIT; out2: 13 HIT
- - 10; OP: 10-12; line: 18-19 HIT; out1: 13 HIT
- - 13; OP: 13-14; line: 20-20 HIT; out1: EX X
+ - 00; OP: 00-04; line: 02-04 HIT; out1: 05 HIT; out2: 08 HIT
+ - 05; OP: 05-07; line: 05-06 HIT; out1: 08 HIT
+ - 08; OP: 08-09; line: 07-07 HIT; out1: 10 HIT; out2: 13 HIT
+ - 10; OP: 10-12; line: 08-09 HIT; out1: 13 HIT
+ - 13; OP: 13-14; line: 10-10 HIT; out1: EX X
- paths
- - 0 5 8 10 13: X
+ - 0 5 8 10 13: X
- 0 5 8 13: HIT
- 0 8 10 13: HIT
- - 0 8 13: X
-
-loopy
-- branches
- - 00; OP: 00-02; line: 02-06 HIT; out1: 03 HIT
- - 03; OP: 03-07; line: 06-08 HIT; out1: 08 HIT; out2: 03 X
- - 08; OP: 08-11; line: 09-10 HIT; out1: EX X
-- paths
- - 0 3 8: HIT
- - 0 3 3 8: X
+ - 0 8 13: X
</example>
</slide>
diff --git a/slides/xdebug/vld-path-3-paths.png b/slides/xdebug/vld-path-3-paths.png
index ed692c5..f16b367 100644
Binary files a/slides/xdebug/vld-path-3-paths.png and b/slides/xdebug/vld-path-3-paths.png differ
diff --git a/slides/xdebug/vld-path-3-paths.xml b/slides/xdebug/vld-path-3-paths.xml
index a0fbc6a..2e78693 100644
--- a/slides/xdebug/vld-path-3-paths.xml
+++ b/slides/xdebug/vld-path-3-paths.xml
@@ -1,32 +1,31 @@
-<slide>
+<slide style="future">
+<title>Xdebug branch coverage display</title>
<image align="right" filename="vld-path-3-paths.png"/>
-<example>
-<![CDATA[<?php
-function loopy($i)
-{
- do
- {
- echo $i, ' ';
- } while( $i-- );
- echo "\n";
-}
+<blurb>test.php</blurb>
+<example>
+<![CDATA[ 1 <?php
+ 2 function ifthenelse( $a, $b )
+ 3 {
+ 4 if ($a) {
+ 5 echo "A HIT\n";
+ 6 }
+ 7 if ($b) {
+ 8 echo "B HIT\n";
+ 9 }
+ 10 }
+ 11 ?>]]>
+</example>
-function ifthenelse( $a, $b )
-{
- if ($a) {
- echo "A HIT\n";
- }
- if ($b) {
- echo "B HIT\n";
- }
-}
+<blurb>branch.php</blurb>
+<example><![CDATA[…
+xdebug_start_code_coverage(
+ XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE | XDEBUG_CC_BRANCH_CHECK
+);
-loopy(0);
-ifthenelse( true, false );
-ifthenelse( false, true );
-?>]]>
-</example>
+ifthenelse( true, false );
+ifthenelse( false, true );
+…]]></example>
</slide>
diff --git a/slides/xdebug/vld-path-4-code.xml b/slides/xdebug/vld-path-4-code.xml
new file mode 100644
index 0000000..76f026b
--- /dev/null
+++ b/slides/xdebug/vld-path-4-code.xml
@@ -0,0 +1,34 @@
+<slide>
+<title>Xdebug code coverage</title>
+
+<example>
+<![CDATA[<?php
+function ifthenelse( $a, $b )
+{
+ if ($a) {
+ echo "A HIT\n";
+ }
+ if ($b) {
+ echo "B HIT\n";
+ }
+}]]>
+</example>
+<example>
+<![CDATA[<?php
+require 'vendor/autoload.php';
+include 'test.php';
+
+$coverage = new PHP_CodeCoverage;
+
+$coverage->start('coverage1');
+ifthenelse( true, false );
+$coverage->stop();
+
+$coverage->start('coverage2');
+ifthenelse( false, true );
+$coverage->stop();
+
+$writer = new PHP_CodeCoverage_Report_HTML;
+$writer->process($coverage, '/tmp/code-coverage-report');]]>
+</example>
+</slide>
diff --git a/slides/xdebug/vld-path-4-output.xml b/slides/xdebug/vld-path-4-output.xml
new file mode 100644
index 0000000..6ad1091
--- /dev/null
+++ b/slides/xdebug/vld-path-4-output.xml
@@ -0,0 +1,6 @@
+<slide>
+<title>Xdebug code coverage output</title>
+
+<iframe filename="examples/code-coverage-report/test.php.html"/>
+
+</slide>
diff --git a/xdebug-zendcon14.xml b/xdebug-zendcon14.xml
new file mode 100644
index 0000000..08c9463
--- /dev/null
+++ b/xdebug-zendcon14.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<presentation css="10gen-strict.css">
+<topic>Debugging</topic>
+<title>Debugging: Past, Present and Future</title>
+<event>ZendCon 2014</event>
+<location>Santa Clara, CA, US</location>
+<date>October 29th, 2014</date>
+<speaker>Derick Rethans</speaker>
+<email>[email protected]</email>
+<twitter>derickr</twitter>
+<url>http://derickrethans.nl/talks.html</url>
+<joindin>http://joind.in/12091</joindin>
+<slide>slides/mongodb/title.xml</slide>
+<slide>slides/toolbox/me.xml</slide>
+
+<slide>slides/xdebug/agenda-ppp.xml</slide>
+<slide>slides/xdebug/xdebug-var-dump.xml</slide>
+<slide>slides/xdebug/library-ladybug.xml</slide>
+<slide>slides/xdebug/library-krumo.xml</slide>
+<slide>slides/xdebug/library-kint.xml</slide>
+<slide>slides/xdebug/library-symfony.xml</slide>
+<slide>slides/xdebug/cli-color.xml</slide>
+<slide>slides/xdebug/shutup.xml</slide>
+
+<slide>slides/xdebug/tracing.xml</slide>
+<slide>slides/xdebug/functiontrace-summary.xml</slide>
+
+<slide>slides/xdebug/analyse-running-script.xml</slide>
+<slide>slides/xdebug/netbeans.xml</slide>
+<slide>slides/xdebug/komodo.xml</slide>
+<slide>slides/xdebug/phpstorm.xml</slide>
+<slide>slides/xdebug/debugger-activation.xml</slide>
+<slide>slides/xdebug/debugger-browser-extensions.xml</slide>
+<slide>slides/xdebug/debugger-connection-log.xml</slide>
+
+<slide>slides/internals/vld2.xml</slide>
+
+<slide>slides/xdebug/vld-path-1-code.xml</slide>
+<slide>slides/xdebug/vld-path-1-output.xml</slide>
+<slide>slides/xdebug/vld-path-1-paths.xml</slide>
+<slide>slides/xdebug/vld-path-2-code.xml</slide>
+<slide>slides/xdebug/vld-path-2-output.xml</slide>
+<slide>slides/xdebug/vld-path-2-paths.xml</slide>
+
+<slide>slides/xdebug/phpdbg.xml</slide>
+<slide>slides/xdebug/phpdbg-demo.xml</slide>
+
+<slide>slides/xdebug/vld-path-4-code.xml</slide>
+<slide>slides/xdebug/vld-path-4-output.xml</slide>
+
+<slide>slides/xdebug/vld-path-3-code.xml</slide>
+<slide>slides/xdebug/vld-path-3-output.xml</slide>
+<slide>slides/xdebug/vld-path-3-paths.xml</slide>
+
+<slide>slides/xdebug/restaurant.xml</slide>
+
+<slide>slides/xdebug/resources.xml</slide>
+
+</presentation>