Debugging Slim3 from PHPStorm with Xdebug

I’m trying to use Xdebug for PHPStorm and want to step through everything inside the callback function for a route, but can’t get the debugger to get inside there.

  • This is where all my custom scripts go for business logic. I want to make sure all the
    arrays and strings are the values I want them to be when I make a request to slim.

  • I tried to force values via $_SERVER but can’t get Xdebug to get inside that callback
    function.

Is this even possible? If so how do I do it?
Here is a screenshot, I’m just trying to get to line 36

Actually I figured it out, I forgot to set request type to get. Then I clicked run to cursor button after placing cursor on line 35.

I’ve heard this is more difficult with POST reqs though… luckily I don’t need that right now

1 Like