New at PhpStorm. Shot on tarmac.

Doing the eval thing with PhpStorm, and it's not going well.

Context:

I'm an ancient programmer, mostly desktop programming for 30 years.

I've only written 2 or 3 web apps and most of my web programming experience is through Dreamweaver and more recently HTML5 Builder.

So lots and lots of programming experience but not much on the web. But I'm pretty sure I understand most of the basic concepts...

Dreamweaver's perspective on programming (as opposed to its more or less WYSIWYG static page building) is way out of touch. Much of what is taught and lots of the "behaviors" results in code that is absolutely unforgivably exposed in this age of advanced hackery. NO support for PDO or MySQLi in the behavior code, etc.

So I'm trying to move to PHPStorm + Smarty templates + some more or less WYSIWYG tool for creating the .tpl files.

PhpStorm is rapidly turning into the fly in the ointment. It appears to be a very powerful tool for very experienced web programmers and its approach to new installations with new, somewhat inexperienced users is "if you don't know we won't tell you, and even when we do tell you it will presume so much knowledge on your part that if you understand the explanation you probably don't need it."

Apparently, as near as I can tell, the 2 primary hurdles that have to be overcome on a new install is getting PhpStorm to work with your WAMP environment of choice and with one of the 2 debuggers supported. While I didn't have any trouble doing those things with the OTHER tools I have tried that are somewhat similar to PhpStorm, I have not been so lucky with PhpStorm. My patience is at an end.

Personally, if I was selling a tool like PhpStorm, my demo install would come with everything that it needs to function included in the box and with an install that makes it go successfully right out of the box. I guess that's just me. I don't think hand-stitching bytes and nybbles in config files is "cool".

For an exciting little while I thought I'd gotten PhpStorm to recognize my Uniform Server WAMP environment, but any test pages still either failed to run or dumped their output to a console pane, which is not what I would call success. My best guess at what is happening at this point is that PhpStorm, rather than using my ALREADY RUNNING WAMP environment is running PHP in a CLI way EVERY TIME I try to run the PHP page within PhpStrom. Derpa. I don't get it.

So here's my setup:
Windows 7 64-bit
Uniform Server WAMP environment installed to "C:\UniServer"
Apache 2.4.4 VC10
MySQL 5.5.30
PHP 5.4.13
Xdebug and Zend Debugger downloaded but neither installed.


I didn't try installing the Zend debugger because it's install instructions specifically say in step 3: "3. Locate the ZendDebugger.so (Unix) or ZendDebugger.dll (Windows) file in the directory which corresponds to your version of PHP (e.g. 4.3.x, 4.4.x, 5.0.x, 5.1.x, 5.2.x)." And as you can see from the above I have PHP 5.4.13. Does that mean that Zend debugger won't work for me? Yet one more question of the zillions of questions I don't know the answers to, making install progress very difficult and FUD riddled.

I also don't know whether I should be using Zend debugger or Xdebug and what the advantages/disadvantages of that choice may be.

I have uninstalled PhpStorm because I don't know what sort of damage I did trying to fiddle with things and thought a new, clean install might be advisable. I am a clean canvas...I hope.

I have seen videos of a PHP web application output running in chrome that pops out to the PhpStorm debugging environment every time they hit a breakpoint in the code. This is what I would like to be able to do.

Any assistance in getting this set up would be appreciated.

Steve

4 comments

Update:

I've enabled xdebug in my WAMP. I noticed it came pre-installed, but disabled. So I enabled it.

S.

0

Thank you very kindly. Everything works now, including MySQL access.

The two magic pages you gave, in order of need, were:

http://confluence.jetbrains.com/display/PhpStorm/Installing+and+Configuring+XAMPP+with+PhpStorm+IDE#InstallingandConfiguringXAMPPwithPhpStormIDE-IntegratingXAMPPwiththeIDE

and

http://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm

I don't understand much of what I'm seeing and WHY I need things like enabling debugger stuff in BOTH the browser AND the PhpStorm IDE (the other environments I tested didn't have that requirement at all), but these instructions make it clear that it is necessary for PhpStorm, and, having done those things, it all now works as far as I can tell.

Interestingly, there is a little floating toolbar that the documentation didn't mention at all. It actually allows one to start the debugging session in the running web server FROM PhpStorm, which is a departure from the doc. But, again, it all seems to be working and that was what I asked for.

Again, thank you very much. Your assistance was greatly appreciated.

Steve

0
I don't understand much of what I'm seeing and WHY I need things like enabling debugger stuff in BOTH the browser AND the PhpStorm IDE (the other environments I tested didn't have that requirement at all), but these instructions make it clear that it is necessary for PhpStorm, and, having done those things, it all now works as far as I can tell.

I gave you links to the easiest way of making debug running which requires very little configuration from IDE side and coves various debugging scenarios.

But you still can:

  • configure your xdebug (php.ini) to attempt to debug every single php script if so desired (xdebug.remote_autostart = 1)
  • initiate debug session completely from IDE (just create Run/Debug Configuration of appropriate type ("Run | Edit Configurations..." or via drop-down box on main toolbar) and use it by selecting it in drop-down box and then clicking on Debug button) -- http://www.jetbrains.com/phpstorm/webhelp/php-debugging-session.html


The previously mentioned PHP Debugging webinar video has it all covered (different debugging scenarios/approaches):

  • simple debugging with run/debug configurations
  • zero-configuration web applications debugging with Xdebug
  • simultaneous debugging sessions
  • multi-user debugging via DBGp proxy
  • remote debugging
  • and more..

Interestingly, there is a little floating toolbar that the documentation didn't mention at all. It actually allows one to start the debugging session in the running web server FROM PhpStorm, which is a departure from the doc.

Sorry, but I have no idea what are you talking about. Please show a screenshot of it.

In any case -- initiating debug session from outside of IDE (from the browser) is only one approach from few possible -- if you will watch the aforementioned video you will see it.

0

Please sign in to leave a comment.