I am a long time developer mixing languages back and forth. The past few years I've mainly been working with .NET and Visual Studio. Whenever I write something in PHP I tend to work with NetBeans IDE (on my mac) and have always been satisfied with the general functionality, the IntelliSense and the included PHPDoc functionality.
And there I am. I really like VS but now it looks like I'm going to do some php-coding again.
Is PHP Tools for Visual Studio a real option when building enterprise-like frameworks?
If not, shall I continue with NetBeans or would that mainly indicate that I'm an old grumpy fart who's afraid of everything new?
I've read some opinions on Jetbrains php ide but the likings have been mixed, there are also many that seem to like zend but as I figured it it's best when you are using the zend frameworks which is a bit of a problem since I create my own frameworks.
It is a bonus if the IDE can run PHP 5.3 and use the build in webserver for real time debugging. Or are there any other strategies on this I should be aware of?
Visual Studio Code is a great editor for PHP development. You get features like syntax highlighting and bracket matching, IntelliSense (code completion), and snippets out of the box and you can add more functionality through community-created VS Code extensions.
PHP Tools for Visual Studio enables debugging of PHP command-line applications. To launch your script with certain command-line arguments, insert them as a Debug property. Right-click on your project in the Solution Explorer and choose Properties, then select the Debug tab.
You can install an add-on with the extension manager, PHP Tools for Visual Studio. If you want to install it inside VS, go to Tools > Extension Manager > Online Gallery > Search for PHP where you will find PHP Tools (the link above) for Visual Studio.
I use PHP Tools for Visual Studio and I really like it. Mainly because I am primarily an asp.net developer and I feel most comfortable in Visual Studio. It's great that it I can use TFS within Visual Studio to manage my php files. It's also nice that some of the generic CodeRush features work (such as dropping markers). I've found their support to be good. It costs money, but it's reasonable.
To get server side debugging working, follow the steps here:
http://xdebug.org/docs/install .
In Visual Studio, you can get to the PHP tools options from the Tools menu. Tools-Options-PHP Tools.
One thing to be aware of is which php.ini file is being used:
IIS uses this php.ini:
%ProgramFiles%\PHP\v5.3\php.ini
This php.ini gets used when you debug from Visual Studio:
%ProgramFiles%\IIS Express\PHP\v5.3\php.ini
I'll mention one more thing since it was a pain to figure out; I have to debug code in the WordPress functions.php file. To get debugging working on functions.php, I first start the VS debugger (by clicking Debug-Start Debugging) on a small test file like this:
<?php
phpinfo() ;
?>
With the debugger running, breakpoints will then be hit in functions.php. Be aware that debugging WordPress like this will only work in your default browser.
Look into VS PHP as an option. I liked it but it's a bit costly.
Currently I'm using PHP Storm by JetBrains
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With