<p>Right! setting the mapping to the specific file, in this case the controller of plugin made it all work.</p>

<p>Thanks again for taking the time!</p>

CC BY-SA 3.0
2015-11-28T04:24:34.433Z
2015-11-28T04:24:34.433Z
IColorfield
<p>I have xDebug and IntelliJ setup to debug Craft and can run a debug profile where it stops on a breakpoint in <code>index.php</code> and interprets all the variables, etc. in IntelliJ console. However, it never gets to the plugin action when running <code>host/plugin/someaction</code> which has in that action a breakpoint.</p>

<p>Any suggestions?</p>

CC BY-SA 3.0
2015-11-27T17:30:37.127Z
Are you sure your plugin's action is being hit?  If you hit it in a browser with `die('here');` in it you can verify.
Brad Bell
CC BY-SA 3.0
2015-11-27T17:58:27.280Z
Hi @BradBell thanks for the comment. Yes the plugin works fine but since we are adding more complexity to it we needed to have the ability to debug it. FYI we used this example http://www.sitepoint.com/install-xdebug-phpstorm-vagrant/ skip to the Configuring PHPStorm – Servers part. Again adding a breakpoint in public/index.php  on `$craftPath = '../craft';` it debugs.
IColorfield
CC BY-SA 3.0
2015-11-27T18:02:14.573Z
Have you gotten the path mappings setup correctly?
megatrond
CC BY-SA 3.0
2015-11-27T20:22:09.913Z
@megatrond we can debug anything from within the craft/app, craft/config. Our path mapping is mapped at the root of the project where you have the craft and public folder and for the public folder we also added the absolute path on the server. We tried putting a breakpoint on other plugins but no success.
IColorfield
<plugin-development><plugins><debugging>
Craft CMS plugin action debugging with IntelliJ
# Craft CMS plugin action debugging with IntelliJ

(Asked by: username_0 on 2015-11-27)

I have xDebug and IntelliJ setup to debug Craft and can run a debug profile where it stops on a breakpoint in `index.php` and interprets all the variables, etc. in IntelliJ console. However, it never gets to the plugin action when running `host/plugin/someaction` which has in that action a breakpoint.

Any suggestions?

**Tags:** plugin-development, plugins, debugging
> **Comments:**
> **username_1**: Are you sure your plugin's action is being hit?  If you hit it in a browser with `die('here');` in it you can verify.  
> **username_0**: Hi @BradBell thanks for the comment. Yes the plugin works fine but since we are adding more complexity to it we needed to have the ability to debug it. FYI we used this example http://www.sitepoint.com/install-xdebug-phpstorm-vagrant/ skip to the Configuring PHPStorm – Servers part. Again adding a breakpoint in public/index.php  on `$craftPath = '../craft';` it debugs.  
> **username_2**: Have you gotten the path mappings setup correctly?  
> **username_0**: @megatrond we can debug anything from within the craft/app, craft/config. Our path mapping is mapped at the root of the project where you have the craft and public folder and for the public folder we also added the absolute path on the server. We tried putting a breakpoint on other plugins but no success.  

---

## 1 answers

### Answer by username_0 on 2015-11-28. Score: 1

Right! setting the mapping to the specific file, in this case the controller of plugin made it all work.

Thanks again for taking the time!


---

