PHPStorm 8 and Debugging Laravel on OSX

Greetings all,

I've been running into an odd bug debugging Laravel sites in PHPStorm and was hoping it would have been resolved in version 8, but I'm still running into the issue.

It may be something minor, so I want to toss it out there.

For my environment, I'm on a MacBookPro with version 5.5.12 of PHP running.

I have my XDebug environment setup just fine. I'm running Apache with a virtual host environment. I typcially setup a new PHP Web Applicatoin in my configuration settings for each new project. I point it to the URL of my app (such as http://projectx.dev) save, set a breakpoint, click the bug icon and life is good.

With Laravel, it was a little different. I setup my PHP WebApplication, but under the server settings I also checked the "Use path mappings" settings, but left the mapping blank. I'd apply and save the settings.

When I click the bug icon, the first thing PHPStorm does is yell at me for having an invalid path mapping in the debugger tab. I click the link, specify the path to the root of my project (not the public folder) and debugging works great. I can hit all my breakpoints and do everything I expect.

Oddly enough, after closing and reopening PHPStorm, or potentially after 3 or 4 subsequent start/restart of the debugger, I seem to lose my breakpoint references. I have to stop the debugger, go to my PHP Web Application config, blank out the path mapping, apply/save, and then restart the debugger with the familiar "missing path" message. I remap and life is good again.

Is there something to my setup that I'm doing wrong to have to redo everytime? Or is this just one of the side effects of a virtual host environment. I've seen numerous posts/blog entries outlining debugging in PHPStorm, but a lot of them either rely on physical paths or were Windows based.

Ideas?

Please sign in to leave a comment.