PHP Tools for Visual Studio: Difference between revisions

Content deleted Content added
m Fix links to C/C# (via WP:JWB)
m Bot: Fixing double redirect to Visual Studio
Tags: Redirect target changed PAWS [2.1]
 
(2 intermediate revisions by one other user not shown)
Line 1:
#REDIRECT [[Visual Studio]]
{{Infobox software
| name = PHP Tools for Visual Studio
| developer = [[DEVSENSE|DEVSENSE s.r.o.]]
| released = {{Start date and age|2012|03}}
| latest release version = 1.30
| latest release date = {{Start date and age|2019|05|10}}
| status = Active
| programming language = [[C Sharp (programming language)|C#]]
| operating system = [[Microsoft Windows]]
| language = English, Spanish, German and others (fr, ja, pt-br, ro, ru, tr, zh)
| license = [[Proprietary software|Proprietary]]
| website = {{URL|https://www.devsense.com}}
}}
 
'''PHP Tools for Visual Studio''' is a commercial extension for [[Microsoft Visual Studio]]<ref>https://visualstudiomagazine.com/articles/2017/08/23/php-tools.aspx</ref><ref>https://blogs.msdn.microsoft.com/vyvojari/2013/11/06/php-tools-for-visual-studio/</ref><ref>https://www.zive.cz/clanky/php-a-microsoft-velmi-dobra-kombinace/sc-3-a-180659/default.aspx</ref>, which adds the ability to work with [[PHP]] programming language. PHP Tools integration allows software developers to create and manage PHP projects ([[computer programs]], [[web sites]], [[web services]] and [[web apps]]), debug and maintain the source code.
 
PHP Tools works with a code editor for PHP that supports [[IntelliSense]] (the code completion component) as well as [[code refactoring]]. It has an integrated debugger for local and remote debugging. It also includes other built-in tools such as integrated support for [[Composer]] packages, testing through [[PHPUnit]], support for PHP template engines such as [[Smarty (template engine)|Smarty]] and [[Twig]], on-the-fly code validation, automatic installation and configuration of PHP or deployment through SFTP, FTP, FTPS, File System or Web Deploy<ref>https://www.devsense.com/en/features</ref>.
 
PHP Tools also has a version for extending the free<ref>https://code.visualstudio.com/docs/supporting/faq#_is-vs-code-free</ref> [[Visual Studio Code]] (it's called [[PHP Tools for VS Code]]) for PHP language. This [[Plug-in (computing)|plugin]] allows editing, code validation, refactoring, debugging and testing, among others in Microsoft Visual Studio Code.
 
==Features==
 
All of the features in Visual Studio can be used with PHP Tools, for instance:
 
* IntelliSense
* Navigation
* Code Formatting
* Syntax Highlighting
* Refactoring
* Debugging
 
===Code Editor===
PHP Tools includes a code editor that supports [[syntax highlighting]] and code completion to make the PHP code readable. The editor reuses other language editors from Visual Studio such as [[HTML]], [[CSS]], [[JavaScript]].
 
The code editor makes use of [[PHP]] 5 and PHP 7 type hints and PHPDoc comments. It analyses values and expressions in order to estimate the resulting type. Then, based on the analysis, the app predicts when an expression will cause a run-time error. These errors usually indicate a typo, a missing use or an invalid missing namespace name in PHPDoc comment.
 
===Debugger===
Features of the integrated [[debugger]] of Visual Studio are supported by PHP Tools. The debugger consists of two main components: the front-end component is the one responsible for visually communicating with the user, and the back-end component is hooked directly to the PHP core. PHP Tools for Visual Studio provides the front-end component and communicates with the back-end provided by the [[Xdebug]] extension. The communication uses the DBGp debugging protocol.
Equally as in Visual Studio<ref>https://docs.microsoft.com/en-us/visualstudio/debugger/debugger-feature-tour?view=vs-2019#set-a-breakpoint-and-start-the-debugger</ref>, the debugger allows setting [[breakpoints]] to stop execution at a certain position in the code and watches which monitor values of variables when the program is paused. Breakpoints can be conditional, meaning that they brake the code when a given PHP expression is evaluated as true. Also, they can break when a given exception is thrown or by default, the program breaks when a fatal error happens, that is, an exception that prevents the program from continuing.
Once broken into the debugger code, it can be executed one line at a time: this is called stepping. The step commands include Step Into, Step Over, and Step Out<ref>https://docs.microsoft.com/en-us/visualstudio/debugger/using-breakpoints?view=vs-2019</ref>. When the program is broken, if the mouse hovers over the variable, the current value is displayed in a tooltip, where it can be modified. The debugger allows to change the state of the executed program by editing the values of variables, so alternative execution paths can be examined.
 
===Testing===
The Test Explorer in PHP Tools is a Visual Studio window that contains a list of test cases organized by projects, groups or by test suites. The Test Explorer allows to run and debug all tests, selected tests or tests listed in a group or suite.
 
===Other features===
 
• '''Composer Manager''': PHP Tools for Visual Studio has a package ecosystem support through integration with Composer (software). This feature allows the user to search, install, update and manage packages from a graphical user interface.
 
• '''Twig Designer''': The Twig template support includes syntax highlighting, error checking, code completion and outlining. It is built into the system and its features do not require the Twig engine to be installed in the project, but some of them provide additional information when it is present.
 
• '''Smarty Code Editor''': just as with the Twig designer, the Smarty support is incorporated and its features do not require it to be installed in the project. However, it can be installed either via a composer package or its source code can be directly integrated into the project.
 
• '''Multilanguage PHP Manual''': PHP Tools comes with an integrated PHP language manual for the user to consult key references.
 
• '''Code Validator''': The code is analyzed semantically in order to find errors that will be thrown in run-time. See “code editor” above for more information.
 
• '''Project Publish''': This feature publishes projects to a remote server. The user can deploy a whole project or just a single file. FTP, SFTP, FTPS, File System and Web Deploy (mainly used for [[Microsoft Azure|Azure]]) are covered.
 
• '''Refactoring''': the user can avoid typos and keep the code clean when making code alterations, rename identifiers when typing or by using the rename dialog. Refactoring can rename identifiers in place or with a detailed preview where you can uncheck single occurrences.
 
• '''PHP Issues Recovery''': automatically installs and configures PHP to be used properly together with the [[Xdebug]].
 
• '''New Project Wizard''': an application that helps the user generate new projects, modeled from a chosen project template.
 
 
 
 
[[Category:Visual Studio extensions]]
[[Category:Integrated development environments]]
 
 
 
==External links==
 
[https://www.devsense.com/ Devsense.com]
 
[https://visualstudio.microsoft.com/ Microsoft Visual Studio]
 
 
 
==References==
<!-- Inline citations added to your article will automatically display here. See https://en.wikipedia.org/wiki/WP:REFB for instructions on how to add citations. -->
{{reflist}}