sidkshatriya / dontbug

Dontbug is a reverse debugger for PHP
Apache License 2.0
702 stars 13 forks source link

dontbug can't find file #4

Closed tbfisher closed 8 years ago

tbfisher commented 8 years ago
# 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
sidkshatriya commented 8 years ago

This warning is harmless and you should ignore it.

Actually this warning is a bit misleading. Perhaps I'll remove it in the future. Basically it means that the IDE is trying to set a breakpoint corresponding to a file from another project.

Can you give me overall feedback -- are you able to successfully do reverse debugging in your IDE? What IDE are you using BTW?

sidkshatriya commented 8 years ago

Ok saw you comment on #3 reverse mode working well for you! Thanks for that feedback.