Skip to content
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.

IDE Setup Tips and FAQ

Sidharth Kshatriya edited this page Oct 31, 2016 · 13 revisions

Q. How do I setup Dontbug on Netbeans?

In the Netbeans PHP IDE go to Tools->Options, click on the PHP icon and in the Debugging Tab make sure:

  • Session ID is set to dontbug
  • The checkbox Stop at First Line is selected

Stop at First Line is optional. However, its recommended because it helps get you oriented when starting to debug.

Q. How do I setup Dontbug on PhpStorm?

Setup a new PHP Remote Debug configuration (via Edit Configurations). You can leave Servers blank. Even Ide Key should be left blank. PhpStorm is pretty smart about accepting debugging connections and will usually do the right thing automatically.

If you want to make the debugger stop at the first line (recommended), you can select it from the main menu Run dropdown.

Q. How do I debug a Laravel application?

In general you can debug arbitrary PHP code with Dontbug, but here are some specific tips for Larvel applications.

Say you have a Laravel application. e.g.

$ cd ~
$ laravel new test
$ cd test
$ dontbug record ~/test public
# Please note that something like: 
#     dontbug record ~/test artisan -p --args serve` 
# i.e. equivalent to: `php artisan serve` (when not recording) 
# has subtle issues. Avoid it.

Navigate to http://127.0.0.1:8088. Press Ctrl+C to end recording.

Create a PHP project in the IDE of your choice. You need to choose the PHP Application with Existing Sources option in most cases. Add the ~/test folder. Setup the debugger (see below to learn how to do this for Netbeans and PhpStorm). Start the debugger in your IDE and then run the command dontbug replay in a terminal.

Q. How do a debug a Symfony application?

In general you can debug arbitrary PHP code with Dontbug, but here are some specific tips for Symfony applications.

Lets say you have a symfony application like symfony-demo. You can debug it like this:

$ cd ~
$ git clone https://github.com/symfony/symfony-demo
$ cd syfony-demo
$ dontbug record ~/symfony-demo web

Navigate to http://127.0.0.1:8088/app.php. Press Ctrl+C when you're done recording.

Create a PHP project in the IDE of your choice. You need to choose the PHP Application with Existing Sources option in most cases. Add the symfony-demo folder. Setup the debugger (see below to learn how to do this for Netbeans and PhpStorm). Start the debugger in your IDE and then run the command dontbug replay in a terminal.