Breakpoints not hit with xdebug, PhpStorm and Laravel 3 / mod_rewrite

前端 未结 3 1442
迷失自我
迷失自我 2021-02-02 17:16

I\'m pretty desperate and running out of ideas:

I\'ve configured xdebug and PhpStorm for a Laravel 3 project. Running the project locally on Mac OS X Apache, so PhpStorm

相关标签:
3条回答
  • 2021-02-02 17:42

    For those who are using Netbeans and Laravel, you need to set the "Web Root" as your public folder which located in your project->Properties->Sources.

    0 讨论(0)
  • 2021-02-02 18:02

    In my case, the cause of the "breakpoint_set" / "command is not available" problem was disabled xdebug.extended_info option (it is enabled by default but I disabled it for profiling).
    Breakpoints do not work then xdebug.extended_info is disabled.
    I have got breakpoints worked after reenabling xdebug.extended_info.

    0 讨论(0)
  • 2021-02-02 18:03

    You need to set the Path Mappings You don't need to set it for each file. To resolve my issue, I went to the IntelliJ (same for PHPStorm) Preferences > PHP > Servers .. selected my server and set the following (see note 2 below):

    enter image description here

    NOTE 1: I could also have set the path directly to the project root, but since I am not interested in debugging anything other than my Laravel "public" folder and my application, I only set paths for those 2 folders. After this everything worked perfectly.

    NOTE 2: The image shown above is not from the "Settings" dialog referred to in the steps above, but rather from the "Resovle Path Mapping Problem" dialog which presents you with the same map mappings widget which works the same way. Fixings the settings in either place will work. The Resolve Path Mapping Problem dialog will appear if you have no server debug settings to start with and the IDE detects a mapping problem, at which point it will also create the server settings for you.

    0 讨论(0)
提交回复
热议问题