Last Updated: February 25, 2016
· buzzedword

Configuring a Sublime/MAMP Xdebug setup

Xdebug is incredibly useful; it prettifies your errors, and adds value to your stack traces. Some devs don't realize the power you get with it before things blow up. Did you know you can enable a remote debugging session, and integrate Xdebug to your IDE? For sure!

MAMP makes this difficult, though. So first, we need to configure MAMP to enable remote debugging.

Open up /Applications/MAMP/bin/php/{php-version}/conf/php.ini

Find the following section:


Replace it with:





Restart MAMP, and you should have Xdebug enabled with remote debugging on.

Next, in Sublime, install

Open the Xdebug menu in Sublime with shift+f8, start the debugger, add a breakpoint in your code and refresh your application in browser. Xdebug will halt on the breakpoint, and display a stack trace in the two panels at the bottom of the IDE.

Here are additional shortcut keys:

  • Shift+f8: Open XDebug quick panel
  • f8: Open XDebug control quick panel when debugger is connected
  • Ctrl+f8: Toggle breakpoint
  • Ctrl+Shift+f5: Run to next breakpoint
  • Ctrl+Shift+f6: Step over
  • Ctrl+Shift+f7: Step into
  • Ctrl+Shift+f8: Step out

Happy Debugging!

2 Responses
Add your response


over 1 year ago ·

Shift+f8 doesn't work ?

over 1 year ago ·