# Xdebug Netbeans Setup

**URL:** <https://discourse.slimframework.com/t/xdebug-netbeans-setup/738>\
**Category:** Questions\
**Created:** [September 19, 2016, 5:23pm UTC](https://discourse.slimframework.com/t/xdebug-netbeans-setup/738 "2016-09-19T17:23:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lektrikpuke](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/lektrikpuke/32/214_2.png) [@lektrikpuke](https://discourse.slimframework.com/u/lektrikpuke)\
**Post date:** [September 19, 2016, 5:23pm UTC](https://discourse.slimframework.com/t/xdebug-netbeans-setup/738/1 "2016-09-19T17:23:55Z")

</div>

I can’t seem to get xdebug working with Slim. Any ideas on how this can be done/setup? Note: Although I have not had issues yet, I would like to be able to step through the code when needed. So, if there is something other than xdebug to use with Slim, I’m all ears.

Thanks

---

<div class="post-metadata">

**Author:** ![pablodonayre](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/pablodonayre/32/377_2.png) [@pablodonayre](https://discourse.slimframework.com/u/pablodonayre)\
**Post date:** [February 13, 2018, 10:18pm UTC](https://discourse.slimframework.com/t/xdebug-netbeans-setup/738/2 "2018-02-13T22:18:16Z")

</div>

I have the same problem. Need to go through the code but seems to be looping through the index file.

How can i configure Netbeans and Xdebug for that ? (also i have running my Xdebug but cant get it work with slim framework)

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [February 13, 2018, 10:45pm UTC](https://discourse.slimframework.com/t/xdebug-netbeans-setup/738/3 "2018-02-13T22:45:40Z")

</div>

Make sure that Xdebug is installed and all settings are correct. Here are some good installation instructions:

[Installing Xdebug for XAMPP with PHP 7.x](https://gist.github.com/odan/1abe76d373a9cbb15bed)

Then change the Netbeans debugging options like this:  
[https://postimg.org/image/8tfvemy7l/](https://postimg.org/image/8tfvemy7l/)

---

<div class="post-metadata">

**Author:** ![pablodonayre](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/pablodonayre/32/377_2.png) [@pablodonayre](https://discourse.slimframework.com/u/pablodonayre)\
**Post date:** [February 14, 2018, 4:59pm UTC](https://discourse.slimframework.com/t/xdebug-netbeans-setup/738/4 "2018-02-14T16:59:17Z")

</div>

Thanks for the information and support.  
I have reviewed it and also reviewed:  
[https://stuporglue.org/setting-up-xdebug-with-netbeans-on-windows-with-a-remote-apache-server/](https://stuporglue.org/setting-up-xdebug-with-netbeans-on-windows-with-a-remote-apache-server/)

My Server is: PHP Version 7.0.25-0ubuntu0.16.04.1

1. I have installed XDEBUG in my Ubuntu server, following the instructions of [https://xdebug.org/wizard.php](https://xdebug.org/wizard.php)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/1e8f1c8f6b71241ed5fa603ea49d36d350d17dc8.png)

![image](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/9a9fd0b4dbb026cabb10f5978a57afa3feef44ad.png)

Also, i have added the following: sudo nano /etc/php/7.0/mods-available/xdebug.ini

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/8bb131239e1836e1e4e55907505998b9733cf2e5.png)

Restart: `sudo systemctl restart php7.0-fpm` and `sudo service nginx restart`

1. After that in my phpinfo() i get:  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/2ab29de7f59c7d808e8aa2332d7a1574215eb6d0.png)

**The following steps were done in my laptop with WINDOWS 8.1**  
3) Then i have configured my Netbeans 8.2

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/f1b175a892d117285d0f102fb0669bc4eb17ad0c.png)

1. And my Putty  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/aad8d48a97bcb9383ed79f0a49dd6fa496de4170.png)

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/4fab5ebad91c650249d190b4825b350038a3f2ca.png)

1. After that, my Netbeans is connected  

2. After that, no matter what i do (F5, F7, F8), it loops through my public/index.php

Any idea of how to debug the controllers behind my INDEX.php ?

Thanks in advance for your support.

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [February 14, 2018, 5:04pm UTC](https://discourse.slimframework.com/t/xdebug-netbeans-setup/738/5 "2018-02-14T17:04:35Z")

</div>

Please compare your settings with this screenshot.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/3fdcf6d3c5eea98031718d5467d8dd13a447e658.jpg)

- Disable all checkboxes
- Set `output_buffering = Off` in your php.ini file
- Try to debug on your localhost first

---

<div class="post-metadata">

**Author:** ![pablodonayre](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/pablodonayre/32/377_2.png) [@pablodonayre](https://discourse.slimframework.com/u/pablodonayre)\
**Post date:** [February 14, 2018, 6:14pm UTC](https://discourse.slimframework.com/t/xdebug-netbeans-setup/738/6 "2018-02-14T18:14:03Z")

</div>

Hi Odan,  
Thank you very much, now, after several tests, its working with your last instructions

1. I have modified the server configuration as follows: `sudo nano /etc/php/7.0/fpm/php.ini`  
 ![output_buffering](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/ea3c485bc7caa9e792525ed32ca1c53d9769dd10.PNG)

And after that: `sudo systemctl restart php7.0-fpm`

The result:

 ![output_buffering_2](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/1b7236f08fb30c4abcf1643546022ba229020c58.PNG)

1. In my laptop:  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/15b628aa3457d67f772cd49bb180b94e9fb5b4cd.png)

The only difference was in the Session ID. But i left it because it matches with the one in my phpinfo(), as follows:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/426cf825b2e143bfcde070a3b60d78b33eb6b868.png)

Note: Also, an additional post with TUNNELING, in order to avid forwarding ports, and avoiding firewalls  
[https://derickrethans.nl/debugging-with-xdebug-and-firewalls.html](https://derickrethans.nl/debugging-with-xdebug-and-firewalls.html)

Thanks again !!!
