5

Here's my problem: I have to debug a Wordpress theme with a lot of dependencies (that I don't know) and no documentation/comments because I need to edit it by adding some features.

So the question is: is there a way to access to real time stack trace to dump function calls? Or either a way to see the stack trace at the end of a request?

The stack I'm working on is composed by:

  • Apache 2.4
  • PHP 5.6
  • MariaDb 10.1.13

and is running under Windows with XAMPP but I've a similar stack with MySQL 5.6 running on a CentOS server if can be helpful.

Kalizi
  • 457
  • 7
  • 21
  • Is this a production setup. Or do you have a development environment? – SH- Aug 18 '16 at 14:18
  • 2
    http://php.net/manual/en/function.debug-backtrace.php? or if you install xdebug, you can dig right into the request while it's in-flight. – Marc B Aug 18 '16 at 14:18
  • It's a development environment. How can I do with xdebug? – Kalizi Aug 18 '16 at 14:24

1 Answers1

0

If you're using PHPStorm (Maybe some other IDE's also include this), you can integrate XDebug using this guide, which will let you set break points in your code and step through execution line by line, seeing the results of variables and so on, which sounds like it might be what you're interested in

Gareth Parker
  • 5,012
  • 2
  • 18
  • 42