Dontbug is a reverse debugger for PHP

Overview

Dontbug Debugger

Dontbug is a reverse debugger (aka time travel debugger) for PHP. It allows you to record the execution of PHP scripts (in command line mode or in the browser) and replay the same execution back in a PHP IDE debugger. During replay you may debug normally (forward mode debugging) or in reverse, which allows you to step over/out backwards, step backwards, run backwards, run to cursor backwards, set breakpoints in the past and so forth.

Debugging with the ability to run in reverse allows you to hunt down bugs much more easily. It also allows you to understand the runtime behavior of large PHP codebases more efficiently.

Dontbug has been implemented in golang and a bit of C.

Demo Videos

Short Demo Video (1m35s)

Demo Video (9m04s)

Debugger features

  • Debug PHP sources in forward or reverse
  • Ability to set line breakpoints, inspect PHP variables and the call stack, step over/out/into backwards or forward, hit breakpoints when running in reverse or forward mode, run to cursor backwards etc.
  • Full compatibility with existing PHP IDEs like Netbeans, Eclipse PDT, PhpStorm or any other PHP IDE/Editor that supports Xdebug. No special IDE plugins or modifications required for your IDE/Editor
  • Minimal learning curve: Apart from getting familiar with debugging in reverse, you continue using the same debugger as before. When Dontbug is put into reverse mode, the buttons on your IDE simply acquire opposite meanings. So step over is now step over backwards. This can be confusing, so here is a cheat sheet.
  • Ability to record PHP script execution completely even if there are network calls, database calls or any non-deterministic input/output in the PHP code. During replay, the PHP scripts will see the same input/output results from databases, network calls, calls to rand()/time() etc. as during record. (However, PHP will not write/read to the network or database a second time during replay)
  • Highly performant forward/reverse mode execution so you can concentrate on finding the bug and not have the debugger "get in your way"
  • Ability to record multiple web-server requests/responses in one go: Traditional PHP (website) debugging is done on a per URL basis. With dontbug you can record many webserver requests/responses at a time and then debug the consolidated execution trace. This can help you hit breakpoints in code which are rarely triggered or triggered in poorly understood situations. What this means in practice is that pressing run/continue (in forward or reverse mode) can often lead you to the next/previous request in the debugger and not the end of the program. (Feature caveat: be aware that recording too many page requests/responses at a time may degrade performance when debugging)

Limitations and Caveats

Since Dontbug replays a saved PHP script execution trace, you cannot persistently modify a variable value in the debugger. All variables (and "state") in the PHP script is read-only. This limitation is fundamental in the current record/replay architecture. In practice, this is not such a big limitation as changing variable values while debugging is rarely needed.

Dontbug is of beta level quality. Please report any problems you encounter. Dontbug also does not have some advanced debugging features like breaking on named exceptions, breaking on call to/return from a specifically named function, conditional breakpoints[*] and watches at the moment. Some of these are planned for future releases.

[*] You can always emulate conditional breakpoints by adding an if statement for the breakpoint condition and a line breakpoint inside the if statement.

Usage in Brief

  • Record an execution by using dontbug record
  • Ask your PHP IDE to listen for a debugging connection
  • In your favorite shell, execute: dontbug replay
  • Dontbug now tries to connect to the PHP IDE that is listening for debugger connections
  • Once connected, dontbug will replay the last execution recorded (via dontbug record) to the IDE
  • Once connected, use the debugger in the IDE as you would, normally
  • If you want run in reverse mode, press "r" for reverse mode and "f" for forward mode in the dontbug prompt

See below for more details.

Installation and OS Platforms

See Installation Instructions on installing Dontbug on your machine.

How the Dontbug Debugger Works

If you're interested in how the Dontbug debugger works internally please read this document.

Credits

Standing on the shoulders of giants

Most open source projects are built with the help of other open source projects and Dontbug is no exception.

The Mozilla/RR, Xdebug and GDB projects are the most important open source projects that Dontbug depends on. The existence of these fantastic open source projects has allowed Dontbug to be built. The roles and contributions of these three projects to the overall functionality of Dontbug is outlined in the "How the Dontbug Debugger works" document.

The Dontbug executable has been programmed in the golang programming language. Dontbug directly depends on a number of open source golang libraries:

  • The cyrus-and/gdb golang library to communicate with GDB using the GDB/MI protocol
  • The chzyer/readline golang library for a GNU Readline kind implementation
  • The kr/pty golang library to interface with Unix psuedo-terminals
  • The spf13/cobra and the related spf13/viper golang libraries for command line interfaces and persistent configuration
  • The Masterminds/semver golang library for version string comparisons
  • The fatih/color golang library for using colors in Unix terminals

This may not be an exhaustive/upto date list. Please refer to the source code.

License and Copyright

Dontbug is Copyright © 2016 Sidharth Kshatriya. Dontbug is licensed under the terms of the Apache License (Version 2.0).

Using the Dontbug Debugger

Once you have installed dontbug you have two commands available:

  • dontbug record
  • dontbug replay

See dontbug record --help or dontbug replay --help for more information or continue reading.

Command dontbug record

The dontbug record command records the execution of PHP scripts in the PHP built-in webserver or in the PHP command line interpreter. This is used for later forward/reverse debugging in a PHP IDE. A typical workflow is to do a dontbug record followed by dontbug replay.

Syntax

dontbug record <php-source-root-dir> [<docroot-dir>] [flags]
dontbug record <php-source-root-dir> <php-script> --php-cli-script [args-in-quotes] [flags]

Examples

dontbug record /var/www/fancy-site docroot
dontbug record /var/www/another-site

dontbug record ~/php-test/ list-supported-functions.php --php-cli-script
dontbug record ~/php-test/ math/calculate-factorial-min-max.php --php-cli-script --args "10 20"

The first example will spawn the PHP built-in webserver for recording the execution of "fancy-site" website (as the user navigates various URLs in a browser). The docroot of the fancy site will be /var/www/fancy-site/docroot and the <php-source-dir> will be /var/www/fancy-site.

In general, dontbug will be able to handle any PHP framework/CMS as long you meet its minimum requirements and the framework/CMS runs in PHP's built in webserver (most of them should). Here the PHP built in webserver is substituting for Apache, Nginx etc.

The second example is like the first. Here the <docroot-dir> is assumed to be the same as the <php-source-root-dir>.

The third example will record the execution of ~/php-test/list-supported-functions.php

The fourth example will record the execution of a PHP script with two arguments 10 and 20 passed to it. Note the quotes to enclose the arguments. The script's full path is ~/php-test/math/calculate-factorial-min-max.php.

As you have seen if you specify <docroot-dir> or <php-script> then it should specified as a relative path w.r.t to the <php-source-root-dir>.

The <php-source-root-dir> means the outermost directory of all possible PHP scripts that might be executed in this project by PHP sources in this project.

Note

  • Typically <php-source-root-dir> would be the docroot in your PHP project or, sometimes its parent folder. <php-source-root-dir> is not the same as <docroot-dir>, sometimes, as scripts might be placed outside the docroot in some PHP projects e.g. vendor scripts installed by composer. Please keep this directory as specific as possible. For example, you could specify "/" (the root directory) as <php-source-root-dir> as it contains all the possible PHP scripts on your system. But this would impact performance hugely.
  • If you have sources symlinked from inside the <php-source-root-dir> to outside that dir, dontbug should be able to handle that (without you having to increase the scope of the <php-source-root-dir>)

PHP built-in webserver tips

You may record as many http page loads for later debugging when running the PHP built in webserver (unlike traditional PHP debugging which is usually one page load at a time). However be aware that recording too many page loads may degrade performance during debugging. Additionally, you may not pass arguments to the PHP built in server i.e. the --args flag is ignored if not used in conjunction with --php-cli-script.

Config file

If you find that you are frequently passing the same flags to dontbug, you may provide custom config for various flags in a $HOME/.dontbug.yaml file. Sample file:

server-port: 8003
install-location: /some-path/src/github.com/sidkshatriya/dontbug

Most of the parameters defaults should suffice and you will typically need a very minimal .dontbug.yaml config file.

Flags passed via command line will always override any configuration in a .yaml file. If the .yaml file and user flags don't specify a particular parameter, the defaults mentioned in dontbug record --help will apply.

More information and flags

See dontbug record --help for more information on the various flags available for more customization options

Command dontbug replay

The dontbug replay command replays a previously saved execution trace to a PHP IDE debugger. You may set breakpoints, step through code, inspect variable values etc. as you are used to. But more interestingly, dontbug allows you to reverse debug i.e. step over backwards, run backwards, hit breakpoints when running in reverse and so forth.

dontbug communicates with PHP IDEs by using the dbgp protocol which is the defacto standard for PHP IDEs so no special support is required for dontbug to work with them. As far as the IDEs are concerned they are talking with a normal PHP debug engine.

Basic Usage

  • Record an execution by using dontbug record (see dontbug record --help to know how to do this)
  • Ask your PHP IDE to listen for a debugging connection
  • In your favorite shell, execute: dontbug replay
  • Dontbug now tries to connect to the PHP IDE that is listening for debugger connections
  • Once connected, dontbug will replay the last execution recorded (via dontbug record) to the IDE
  • Once connected, use the debugger in the IDE as you would, normally
  • If you want run in reverse mode, press "r" for reverse mode and "f" for forward mode in the dontbug prompt. In reverse mode the buttons in your IDE will remain the same but they will have the reverse effect when you press them: e.g. Step Over will now be reverse Step Over and so forth
  • Press h for help on dontbug prompt for more information

Tips, Gotchas

Some PHP IDEs will try to open a browser window when they start listening for debug connections. Let them do that. The URL they access in the browser is likely to result in an error anyways. Ignore the error. This has absolutely no effect on dontbug as we're replaying a previously saved execution trace but the IDE does not know that.

The only important thing is to look for a message in green "dontbug: Connected to PHP IDE debugger" on the dontbug prompt. Once you see this message, you can start debugging in your PHP IDE as you normally would. Except you now have the ability to run in reverse when you want.

Remember that replays are frozen in time. If you change your PHP code after a replay, you will need to do dontbug record again. If you don't do that dontbug replay will replay a PHP execution corresponding to an earlier version of the source code while your PHP IDE will show the current PHP source code! This can lead to a lot of confusion (and weird behavior) as you may imagine.

Essentially, you need make sure that your PHP sources are not newer than the last recording. If they are, you should simply dontbug record again. There is an advanced/experimental flag --take-snapshot (see dontbug record --help) which allows you to record an execution and take a source code snapshot so that the above issue can be dealt with in a more principled way. However, this feature is not fully documented yet and increases the complexity of your workflow. Therefore: simply do a dontbug record again if your PHP sources have changed since the last recording!

More information and flags

See dontbug replay --help for more information on the various flags available for more customization options

dontbug prompt

Upon running dontbug replay you have a prompt available in which you can switch between forward and reverse modes. This prompt also has help. Press h followed by <enter> to get help.

(dontbug) h
h        display this help text
q        quit
r        debug in reverse mode
f        debug in forward (normal) mode
t        toggle between reverse and forward modes
v        toggle between verbose and quiet modes
n        toggle between showing and not showing gdb notifications
<enter>  will tell you whether you are in forward or reverse mode

Debugging in reverse mode can be confusing but here is a cheat sheet

The buttons in your PHP IDE debugger will have the following new (and opposite) meanings in reverse debugging mode:

  • Step Into now means "Step Into a PHP statement in the reverse direction"
  • Step Over now means "Step Over one PHP statement backwards. As usual, stop if you encounter a breakpoint while doing this operation"
  • Step Out now means "Run backwards until you come out of the current function and are about to enter it. As usual, stop if you encounter a breakpoint while doing this operation"
  • Run/Continue now means "Run backwards until you hit a breakpoint"
  • Run to Cursor now means "Run backwards until you hit the cursor (need to place cursor before current line)"
Comments
  • Installation error

    Installation error

    After installing I get

    # dontbug record /var/www/web/index.php
    dontbug: No <docroot-dir> argument provided. Assuming its the same as <php-source-root-dir>
    dontbug: No --install-location specified. Defaulting to $GOPATH/src/github.com/sidkshatriya/dontbug
    dontbug: Using --install-location "/root/work/src/github.com/sidkshatriya/dontbug"
    dontbug: Using php from path /usr/bin/php
    dontbug: fatal error: base.go:428: base.go:317: Invalid Semantic Version
    

    Install process seemed ok, except for symlinking xdebug headers, instead of

    $ cd $GOPATH/github.com/sidkshatriya/dontbug
    $ cd ext/dontbug
    # create a symlink "xdebug" to the xdebug sources compiled earlier
    $ ln -s ~/xdebug xdebug
    

    I needed to

    $ cd $GOPATH/src/github.com/sidkshatriya/dontbug
    $ cd ext/dontbug
    # create a symlink "xdebug" to the xdebug sources compiled earlier
    $ ln -s ~/xdebug xdebug
    
    opened by tbfisher 9
  • dontbug on lxd

    dontbug on lxd

    I have a problem with installation on lxd (debian). What is this error?

    $ dontbug record --server-listen 192.168.3.23 test/
    
    [FATAL /home/roc/rr/rr/src/RecordSession.cc:1319:handle_signal_event() errno: SUCCESS] 
     (task 24353 (rec:24353) at time 1134)
     -> Assertion `false' failed to hold. Can't defer deterministic or internal signal {signo:SIGSEGV,errno:SUCCESS,code:SEGV_ACCERR,addr:0x7f99b2853080} at ip 0x7f99b4d83934
    Launch gdb with 
      gdb '-l' '-1' '-ex' 'target extended-remote :24353' /usr/bin/php7.0
    
    opened by barl0g 8
  • Unhandled nmap

    Unhandled nmap

    L.S.,

    When fireing up everything looks great. When browsing to the url I get a fatal error

    dontbug: Using config file:/home/xxx/.dontbug.yaml
    dontbug: No <docroot-dir> argument provided. Assuming its the same as <php-source-root-dir>
    dontbug: No --install-location specified. Defaulting to $GOPATH/src/github.com/sidkshatriya/dontbug
    dontbug: Using --install-location "/home/xxx/.go/src/github.com/sidkshatriya/dontbug"
    dontbug: Using php from path /usr/bin/php
    dontbug: Using rr from path /usr/bin/rr
    dontbug: Generating /home/xxx/.go/src/github.com/sidkshatriya/dontbug/ext/dontbug/dontbug_break.c for all PHP code in: /home/xxx/yyy/yyy-api/public
    dontbug: 1 PHP files found
    dontbug: Code generation complete. Compiling dontbug zend extension...
    dontbug: Successfully ran 'make distclean' in dontbug zend extension directory
    dontbug: Successfully ran phpize in dontbug zend extension directory
    dontbug: Running configure in dontbug zend extension directory
    dontbug: Successfully ran configure in dontbug zend extension directory
    dontbug: Successfully compiled the dontbug zend extension
    dontbug: -- Recording. Ctrl-C to terminate recording if running on the PHP built-in webserver
    dontbug: -- Recording. Ctrl-C if running a script or simply wait for it to end
    
    rr: Warning: Your CPU frequency governor is 'powersave'.  rr strongly
        recommends that you use the 'performance' governor.  Not using the
        'performance' governor can cause rr to be at least 2x slower
        on laptops.
    
        On Fedora-based systems, you can enable the 'performance' governor
        by running the following commands:
    
        $ sudo dnf install kernel-tools
        $ sudo cpupower frequency-set -g performance
    
    rr: Saving execution to trace directory `/home/xxx/.local/share/rr/php-7'.
    dontbug zend extension: dontbug.so successfully loaded by PHP
    PHP 7.0.8-0ubuntu0.16.04.3 Development Server started at Thu Oct 13 12:32:13 2016
    Listening on http://127.0.0.1:8088
    Document root is /home/xxx/yyy/yyy-api/public
    Press Ctrl-C to quit.
    [FATAL /home/roc/rr/rr/src/util.cc:626:should_copy_mmap_region() errno: EACCES] Unhandled mmap /home/xxx/yyy/yyy-api/storage/framework/views/eb787bc5b0d00e38b5b2c5b312898d82c9820e4b.php(prot:0x1;SHARED); uid:33 mode:33188
    dontbug: fatal error: base.go:428: record.go:207: signal: aborted
    

    Do you have any clue? The directoy /home/xxx/yyy/yyy-api/storage/ has chmod 777

    Waiting for user feedback Closed due to inactivity 
    opened by django23 7
  • Not able to set breakpoints in scripts without php extensions

    Not able to set breakpoints in scripts without php extensions

    Scripts like artisan are php scripts but since they don't have a .php extension, setting breakpoints in the script will not be possible at the moment

    Find a possible solution to this problem.

    opened by sidkshatriya 2
  • dontbug can't find file

    dontbug can't find file

    # dontbug record /var/www drush/drush --php-cli-script --args "status"
    dontbug: No --install-location specified. Defaulting to $GOPATH/src/github.com/sidkshatriya/dontbug
    dontbug: Using --install-location "/root/work/src/github.com/sidkshatriya/dontbug"
    dontbug: Using php from path /usr/bin/php
    dontbug: Using rr from path /usr/bin/rr
    dontbug: Generating /root/work/src/github.com/sidkshatriya/dontbug/ext/dontbug/dontbug_break.c for all PHP code in: /var/www
    dontbug: 2654 PHP files found
    dontbug: Code generation complete. Compiling dontbug zend extension...
    dontbug: Successfully ran 'make distclean' in dontbug zend extension directory
    dontbug: Successfully ran phpize in dontbug zend extension directory
    dontbug: Running configure in dontbug zend extension directory
    dontbug: Successfully ran configure in dontbug zend extension directory
    dontbug: Successfully compiled the dontbug zend extension
    dontbug: -- Recording. Ctrl-C to terminate recording if running on the PHP built-in webserver
    dontbug: -- Recording. Ctrl-C if running a script or simply wait for it to end
    rr: Saving execution to trace directory `/root/.local/share/rr/php-2'.
    dontbug zend extension: dontbug.so successfully loaded by PHP
    
    ...
    
    dontbug: Closed cleanly. Replay should work properly
    

    however during replay/debugging getting file not found error, but file exists

    # dontbug replay --replay-host $REPLAY_HOST
    dontbug: Using rr from path /usr/bin/rr
    dontbug: Using gdb from path /usr/bin/gdb
    dontbug: No --install-location specified. Defaulting to $GOPATH/src/github.com/sidkshatriya/dontbug
    dontbug: Using --install-location "/root/work/src/github.com/sidkshatriya/dontbug"
    dontbug: Using latest trace
    dontbug: Successfully started replay session
    Launch gdb with
      gdb '-l' '-1' '-ex' 'target extended-remote :9999' /root/.local/share/rr/latest-trace/mmap_hardlink_4_php7.0
    dontbug zend extension: dontbug.so successfully loaded by PHP
    (dontbug) dontbug: Trying to connect to debugger IDE
    dontbug: Connected to PHP IDE debugger
    h <enter> for help. If the prompt does not display press <enter>
    (dontbug) dontbug: Not able to find file:///var/www/drush/includes/startup.inc to add a breakpoint. The IDE is trying to set a breakpoint for a file from a different project or you have not specified the root directory command line parameter correctly. Ignoring
    (dontbug) q
    Exiting.
    dontbug: Closing connection to IDE
    (dontbug) # ls /var/www/drush/includes/startup.inc
    /var/www/drush/includes/startup.inc
    
    Not a Bug 
    opened by tbfisher 2
  • Native MacOS Support

    Native MacOS Support

    This issue is not so much a feature request, as I may be able to help out in this regard (I've been involved in porting HHVM to OSX for example).

    What would be the general areas to look at to make this run on MacOS natively?

    wontfix 
    opened by danslo 2
  • Error link to patch

    Error link to patch

    Install instruction, section Installing (patched) Xdebug from source Wget have link to html page: https://github.com/sidkshatriya/dontbug/blob/master/ext/dontbug/xdebug_2_4.make_extern.dontbug.patch Correct link to raw: https://raw.githubusercontent.com/sidkshatriya/dontbug/master/ext/dontbug/xdebug_2_4.make_extern.dontbug.patch

    opened by sam002 1
  • xdebug patch

    xdebug patch

    The xdebug patch does not look like a very specific dontbug patch. I don't seem to find the patch to be merged or proposed in the xdebug repository.

    Will the patch be merged into upstream someday?

    opened by tdgroot 0
  • panic: interface conversion: interface {} is nil, not string

    panic: interface conversion: interface {} is nil, not string

    Hi,

    I hope you can help; I've installed Dontbug on a totally clean Ubuntu 16.04 VM on VMware Fusion; UEFI bios, 4GB RAM / 20GB disk, only Code Profiling is enabled, not IOMMU and VT-x/EPT. Ubuntu was patched up to date via apt dist-upgrade before proceeding with the installation. I have a record of every keystroke made if that will help, but in brief:

    I've tried this (and had an identical error from dontbug) with both RR 4.5.0 and 4.4.0, both of which seemed to be working well. The version of RR used in the VM below was 4.4.0.

    The installation of all the constituent parts seems OK; I've installed the versions used in the installation instructions religiously and the "dontbug record" phase completes with no errors or warnings. However, when I issue:

    ./go/bin/dontbug -v replay

    I get the following output:

    dontbug: Using config file:/home/username/.dontbug.yaml
    dontbug: Checking rr requirements
    dontbug: Using rr from path /usr/bin/rr
    dontbug: Checking gdb requirements
    dontbug: Using gdb from path /usr/bin/gdb
    dontbug: No --install-location specified. Defaulting to $GOPATH/src/github.com/sidkshatriya/dontbug
    dontbug: getAbsNoSymlinkPath() for /home/username/go/src/github.com/sidkshatriya/dontbug is: /home/username/go/src/github.com/sidkshatriya/dontbug
    dontbug: Using --install-location "/home/username/go/src/github.com/sidkshatriya/dontbug"
    dontbug: getAbsNoSymlinkPath() for /home/username/go/src/github.com/sidkshatriya/dontbug/ext/dontbug is: /home/username/go/src/github.com/sidkshatriya/dontbug/ext/dontbug
    dontbug: Looking for dontbug_break.c in /home/username/go/src/github.com/sidkshatriya/dontbug/ext/dontbug
    dontbug: Found /home/username/go/src/github.com/sidkshatriya/dontbug/ext/dontbug/dontbug_break.c
    dontbug: Completed building association of filename => linenumbers and levels => linenumbers for breakpoints
    dontbug: Using latest trace
    dontbug: Issuing command: /usr/bin/rr replay -s 9999 
    dontbug: Successfully started replay session
    Launch gdb with 
      gdb '-l' '-1' '-ex' 'target extended-remote :9999' /usr/bin/php7.0
    dontbug: Issuing command:  /usr/bin/gdb -l -1 -ex target extended-remote :9999 --interpreter mi /usr/bin/php7.0
    dontbug -> gdb: break-insert -f -d --source dontbug.c --line 99
    gdb -> dontbug: map[class:error payload:map[msg:-break-insert: Unknown option ``f -d --source dontbug.c --line 99'']]
    dontbug -> gdb: break-insert -t -f --source dontbug.c --line 91
    gdb -> dontbug: map[class:error payload:map[msg:-break-insert: Unknown option ``t -f --source dontbug.c --line 91'']]
    dontbug -> gdb: gdb-set print elements 0
    gdb -> dontbug: map[class:done]
    dontbug -> gdb: exec-continue 
    gdb -> dontbug: map[class:running]
    dontbug -> gdb: data-evaluate-expression filename
    dontbug zend extension: dontbug.so successfully loaded by PHP
    PHP 7.0.30-0ubuntu0.16.04.1 Development Server started at Fri Jun  1 00:19:41 2018
    Listening on http://0.0.0.0:8088
    Document root is /var/www/html
    Press Ctrl-C to quit.
    [Fri Jun  1 00:20:07 2018] 192.168.58.1:62585 [200]: /info.php
    gdb -> dontbug: map[class:error payload:map[msg:No symbol "filename" in current context.]]
    panic: interface conversion: interface {} is nil, not string
    
    goroutine 1 [running]:
    github.com/sidkshatriya/dontbug/engine.startGdbAndInitDebugEngineState(0xc42009f0f0, 0xc, 0xc4200eab75, 0xf, 0xc420097ec0, 0xc42020a000, 0x100, 0x100, 0x100, 0xc4200a2180, ...)
    	/home/username/go/src/github.com/sidkshatriya/dontbug/engine/replay.go:301 +0xa81
    github.com/sidkshatriya/dontbug/engine.startReplayInRR(0x0, 0x0, 0xc42009ef40, 0xb, 0xc42009f0f0, 0xc, 0xc420097ec0, 0xc42020a000, 0x100, 0x100, ...)
    	/home/username/go/src/github.com/sidkshatriya/dontbug/engine/replay.go:223 +0x6a1
    github.com/sidkshatriya/dontbug/engine.DoReplay(0x0, 0x0, 0x0, 0x0, 0xc42009ef40, 0xb, 0xc42009f0f0, 0xc, 0x8ba59d, 0x9, ...)
    	/home/username/go/src/github.com/sidkshatriya/dontbug/engine/replay.go:168 +0x26e
    github.com/sidkshatriya/dontbug/cmd.glob..func2(0xb384e0, 0xc420093390, 0x0, 0x1)
    	/home/username/go/src/github.com/sidkshatriya/dontbug/cmd/replay_cmd.go:115 +0x298
    github.com/spf13/cobra.(*Command).execute(0xb384e0, 0xc420093370, 0x1, 0x1, 0xb384e0, 0xc420093370)
    	/home/username/go/src/github.com/spf13/cobra/command.go:766 +0x2c1
    github.com/spf13/cobra.(*Command).ExecuteC(0xb38020, 0xc4200a6040, 0xc4200a6040, 0xc4200dbf18)
    	/home/username/go/src/github.com/spf13/cobra/command.go:852 +0x30a
    github.com/spf13/cobra.(*Command).Execute(0xb38020, 0x8ddde0, 0xc4200a4280)
    	/home/username/go/src/github.com/spf13/cobra/command.go:800 +0x2b
    github.com/sidkshatriya/dontbug/cmd.Execute()
    	/home/username/go/src/github.com/sidkshatriya/dontbug/cmd/root.go:44 +0x2d
    main.main()
    	/home/username/go/src/github.com/sidkshatriya/dontbug/main.go:26 +0x48
    

    N.B "username" has been substituted for my home directory in the text above.

    opened by fireappleblack 17
  • Failed opening required index.php

    Failed opening required index.php

    Hello, after I saw your demo I thought to give your software a try. So I went on into configuring a KVM virtual machine where I mounted the folder containing a drupal installation into the virtual machine at /srv/www/drupal/current. The mount command I use is: mount -t 9p -o trans=virtio,version=9p2000.L /drupal /srv/www/drupal/current The site works using the nginx server.

    When I run: dontbug record /srv/www/drupal/current --server-listen=myhostname

    I get the following errors:

    PHP Warning: Unknown: failed to open stream: Interrupted system call in Unknown on line 0
    PHP Fatal error: Unknown: Failed opening required '/srv/www/drupal/current/index.php' (include_path='.:/usr/share/path') in Unknown on line 0
    

    And nother thing. How did you get your drupal installation to work? When I try to run the php built-in server it always executes the index.php saying that the path is not found. I tryied also with different drupal router.php files I found on the web but with no luck. The command I use to test is: php -S myhostname:8088

    Any help is highly appreciated.

    opened by dasj19 0
  • dontbug requires Zend Engine API version 320160303

    dontbug requires Zend Engine API version 320160303

    I get such error, but as i understand 320160303 is version from 7.1 that is not supported.

    $ /usr/bin/phpize7.1
    Configuring for:
    PHP Api Version:         20160303
    Zend Module Api No:      20160303
    Zend Extension Api No:   320160303
    
    $ /usr/bin/phpize7.0
    Configuring for:
    PHP Api Version:         20151012
    Zend Module Api No:      20151012
    Zend Extension Api No:   320151012
    

    What i am do wrong?

    opened by Sentoki 3
  • Docker version of Dontbug

    Docker version of Dontbug

    It might be a good idea to provide some sort of docker version of Dontbug.

    Its not going to be practical in most cases to run Dontbug within Docker (as it requires --privileged mode) (See https://github.com/mozilla/rr/issues/1784 ). So as a substitute, Dontbug can be built within Docker and then the build can be copied over into the host perhaps.

    opened by sidkshatriya 1
Owner
Sidharth Kshatriya
Passionate about understanding things from the ground up.
Sidharth Kshatriya
The Interactive PHP Debugger

The interactive PHP debugger Implemented as a SAPI module, phpdbg can exert complete control over the environment without impacting the functionality

Joe Watkins 841 Oct 9, 2022
Php Debugger to run in terminal to debug your code easily.

What is Dephpugger? Dephpugger (read depugger) is an open source lib to make a debug in php direct in terminal, without necessary configure an IDE. Th

Renato Cassino 190 Dec 3, 2022
Php Debugger to run in terminal to debug your code easily.

What is Dephpugger? Dephpugger (read depugger) is an open source library that allows a developer to debug in php direct in terminal, without necessary

Renato Cassino 190 Dec 3, 2022
Simple php debugger

Debugger Description Simple debugger for php Requirements PHP 5.5+ to 8.0 Usage new \Debugger\Debugger( true, // work mode [false - disable, 'FILE' -

null 0 Aug 10, 2022
A Laravel Package to integrate Nette Tracy Debugger

Nette Tracy for Laravel 5 Better Laravel Exception Handler Features Visualization of errors and exceptions Debugger Bar (ajax support @v1.5.6) Excepti

Recca Tsai 383 Dec 6, 2022
Yet Another Swoole Debugger

English | 中文 yasd Yet Another Swoole Debugger. document How to use it build You'll need to install the Boost library first. macOS: brew install boost

Swoole Project 319 Dec 25, 2022
Slim Framework Tracy Debugger Bar

Slim Framework Tracy Debugger Bar configure it by mouse now in package: Panel Description Slim Framework - Slim Environment RAW data Slim Container RA

null 72 Aug 29, 2022
Handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

PHP Console server library PHP Console allows you to handle PHP errors & exceptions, dump variables, execute PHP code remotely and many other things u

Sergey 1.4k Dec 25, 2022
PHP APM (Alternative PHP Monitor)

APM (Alternative PHP Monitor) APM (Alternative PHP Monitor) is a monitoring extension enabling native Application Performance Management (APM) for PHP

Patrick Allaert 310 Dec 4, 2022
Zipkin PHP is the official PHP Tracer implementation for Zipkin

Zipkin PHP is the official PHP Tracer implementation for Zipkin, supported by the OpenZipkin community. Installation composer require openz

Open Zipkin 250 Nov 12, 2022
Debug bar for PHP

PHP Debug Bar Displays a debug bar in the browser with information from php. No more var_dump() in your code! Features: Generic debug bar Easy to inte

Maxime Bouroumeau-Fuseau 4k Jan 8, 2023
Kint - a powerful and modern PHP debugging tool.

Kint - debugging helper for PHP developers What am I looking at? At first glance Kint is just a pretty replacement for var_dump(), print_r() and debug

null 2.7k Dec 25, 2022
😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.

Tracy - PHP debugger Introduction Tracy library is a useful helper for everyday PHP programmers. It helps you to: quickly detect and correct errors lo

Nette Foundation 1.6k Dec 23, 2022
PHP Benchmarking framework

PHPBench is a benchmark runner for PHP analogous to PHPUnit but for performance rather than correctness. Features include: Revolutions: Repeat your co

PHPBench 1.7k Jan 2, 2023
PHP Debug Console

PHP Console A web console to try your PHP code into Creating a test file or using php's interactive mode can be a bit cumbersome to try random php sni

Jordi Boggiano 523 Nov 7, 2022
PCOV - CodeCoverage compatible driver for PHP

PCOV A self contained CodeCoverage compatible driver for PHP Requirements and Installation See INSTALL.md API /** * Shall start recording coverage in

Joe Watkins 613 Dec 21, 2022
Low-overhead sampling profiler for PHP 7+

phpspy phpspy is a low-overhead sampling profiler for PHP. For now, it works with Linux 3.2+ x86_64 non-ZTS PHP 7.0+ with CLI, Apache, and FPM SAPIs.

Adam 1.3k Dec 24, 2022
The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function that you can use instead of var_dump().

VarDumper Component The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function t

Symfony 7.1k Jan 1, 2023
PHP errors for cool kids

whoops PHP errors for cool kids whoops is an error handler framework for PHP. Out-of-the-box, it provides a pretty error interface that helps you debu

Filipe Dobreira 12.9k Dec 24, 2022