Skip to content

15 comments

On my todo is to write 3 more tutorials to cover Xdebug's profiler, tracer and code coverage features.

6 points

This post is a great demonstration on what makes PHPStorm such a good IDE.

Do another one that shows the PHPUnit integration sometime.

4 points

I'd originally intended to show how to set everything up for Netbeans as well, but then ran into that error that I briefly spoke about in the article, so I scrapped Netbeans.

I'll probably go back and add in instructions for some of the more popular text editors later on, as I don't want this to be just a promo for PhpStorm.

1 points
unknown author

For what its worth I run WAMP + Netbeans, and don't have any issues with Xdebug.

1 points

I'm using Netbeans+Xdebug (6.*-7.1.2, ubuntu) without any problems while debugging. Had no problems at all ever. The bugs linked in the article are fixed, or rarely come into play.

Netbeans lacks that add-browser-bookmark feature, but something similar can easily and nicely be done with browser-extensions like Xdebug helper.

I never tried PhpStorm though. It seems to be quite nice. Maybe i will when i finally finish this stupid project...

Until then i'm fairly happy with my bloated-, memory-hogging- netbeans as it actually runs almost smooth with my 4GB of ram.

4 points

3Gb of ram, 2600mhz (amd), Ubuntu. PhpStorm is working properly without any freezes. But this will lasts till you are working with good-designed project (w/o hundreds of global variables and thousand(s) class definitions in global scope, otherwise phpstorm's intellisense will make lookup for all these variables and, yeah, it will end up with 3-10 second freezes)

1 points

Debuggers are great, and have their place, and yes we should use them. However sometimes you just want to know "what's that variable". Debuggers are still slower at dumping that information out, then just a quick 'var_dump($foo); exit;'.

Maybe if there was a 'dump this' button in IDEs, and the dumped variables were seperate to the variable list, that would make this a little more swift.

0 points

I don't agree with var_dump($foo) being faster than clicking to create a breakpoint and then running your application.

5 points

Then we'll have to agree to disagree. But if you break down the steps var dump becomes:

  • add var_dump
  • alt+tab
  • refresh

whilst with xdebug:

  • add the breakpoint
  • alt+tab
  • refresh
  • alt+tab back
  • goto the variables pane
  • look through for your variable

It's minor, but when you could be working on a site for months, those extra steps build up.

Don't get me wrong, debuggers are awesome, and allow you to have a deeper understanding of your code. But sometimes you don't need that, and var_dump is still a useful tool in the toolbox.

2 points

xdebug also prettifies var_dump output.

1 points

Yeah I've noticed, which is really useful. I'm not saying don't use xdebug.

My comment is in response to the article saying that you never need to use var_dump (and similar) with xdebug. There are times where it's just quicker to dump it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.