Documentation
Php Modules
In VS.Php you can select which Php modules are available in intellisense. The list of Php modules is available in the Php Modules node in the solution view under the project node. VS.Php already have a few modules added by default that are not listed in the list like mysql and a few other core modules in Php.
VS.Php does not include all Php modules in intellisense to improve the responsiveness of the editor and facilitate finding the function you are looking for.

Deploy Troubleshooting
If you are having issues with the deployment component or remote projects feature you can enable tracing to help diagnose the problem.
Go to the VS.Php main registry hive:
HKEY_LOCAL_MACHINE\SOFTWARE\Jcx.Software\VS.Php\V2.4\2008
Add the following entries:

DeployTrace = True
DeployLevel = All
Please note that the 2008 must be replace to SE, 2005 or 2003 if you are using those respective editions.
Deployment
VS.Php allows you to deploy files to a remote location. To deploy your project, right click on the project in the solution view and click deploy. Also when starting a debug session, VS.Php will automatically deploy your project. VS.Php will only deploy the files that are newer than the ones on the server.
Protocols supported:- Network share
- Ftp
- SFtp (SSH)
- Ftp/S (SSL)
Deploy single files
You can select a file from the solution view and deploy it. This is useful when debugging, it allows to push new changes to the remote server without interrupting the debug session.
Pre and post deploy command
Sometimes you want to execute a script before and/or after deploying your project. Use these settings to enter the name of the script (batch file) or process you want to execute.
What's new on VS.Php 2.3
Main updates in VS.Php 2.3
- VS.Php SE and 2005 support Windows Vista
- Support for Visual Studio 2005 SP1 and Visual Studio .Net 2003 SP1
- Support for remote server projects. Edit remote files as if they were local.
- Support for importing projects via Ftp, FtpS and SFtp
- Add support for Ftp over SSL
- Smarter deployment mechanism
- Improvements in auto formating
- Latest Php 5.2 and Php 4.4
- Updated Php and PEAR documentation
What's new on VS.Php 2.4
Major Changes
- Support for Visual Studio 2008
- Drag-n-drop deployment of files. Allows you to copy files back and forth with a remote server.
- XDebug support. You can choose between XDebug or DBG for debugging your script.
- Support for locals watch window
- Autocomplete html attributes
- Autocomplete phpdoc comments
Minor Changes
- Save credentials when working on remote projects
- Improve class inheritance intellisense when using Php references.
Mapping remote files
When VS.Php receices notification that a breakpoint has been tiggered on the server, it gets the remote file name in which the breakpoint occured. It then needs to find a local copy of that file to show the developer. In the local system, the phpproj file has to be at the root of the application. Any breakpoints that occur on files outside this folder will not work.
For example, let's say you have an application on the remote server like this:
Importing a project from a remote server
Importing a project from a remote server
VS.Php provides a mechanism in which you can create a new project locally based on the content in a remote server. The wizard will download all the php and related files via Ftp, FtpS or SFtp.
The process starts with a new project wizard. It asks you for the location of the remote server. You can use Ftp, SFtp and FtpS to acces the remote server. The wizard will then query the server for key information on the Php configuration. Including the following:
Remote server projects
|
Remote server projects offers a new way to work with Php inside Visual Studio. Instead of having to copy the files locally, edit them and then deploy them back to the server, you can edit the files directly on the remote server and see your changes immediately. Code snippetsThis feature is only available in VS.Php for Visual Studio 2005 and VS.Php standalone edition With the code snippets functionality you can quickly select commonly used pieces of code that you use. For instance you can select the for code snippet. The code snippet enters a special editing mode in which you can update the various fields of the snippet. If you have a field that is multiple times, you only have to enter it once. For example in a for statement typically you have a variable that is repeated three times.
for ($i = 0; $i < 10; $i++)
{
}
Once you enter the $i the first time, it will update the snippet in every location where the field is present. Inserting snippets![]() The default way to insert snippets is by right-clicking on the editor and selecting Insert Snippet. You will be presented with the list of snippets available to you. Once you select the snippet you will enter in a special editing mode that lets you move from field to field. Once you press enter, you will leave this special editing mode and will go back to the standard editing mode. Accessing snippets via intellisenseYou can also have quick access to code snippets via the normal intellisense menu. This option may not be enabled by default so you would have to go to the Php text editor options and under the intellisense section select the checkbox that enables including code snippets into the intellisense menu. Code snippet editing mode![]() The image on the left shows the code snippet editing mode. Please note how the various fields are highlighted. In this mode you can only edit the fields and can move from one to another using TAB and Shift-TAB (backward). Once you completed updating the fields, pressing enter returns you to the standard editor mode. Creating your own code snippetsCreating your own code snippets is very easy. Snippets are defined in an xml format. VS.Php lets you put your own snippets in the following location: My Documents\Visual Studio 2005\Code Snippets\PHP\My Code Snippets. The following is a sample code snippet:
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>class</Title>
<Shortcut>class</Shortcut>
<Description>Code snippet for class</Description>
<Author>Jcx.Software Corp.</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>name</ID>
<ToolTip>Class name</ToolTip>
<Default>MyClass</Default>
</Literal>
</Declarations>
<Code Language="PHP">
<![CDATA[/**
Class $name$
*/
class $name$
{
$selected$$end$
}]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
More information about code snippetsCode auto formattingThis feature lets you change the indentation of your code based on the current code structure. You can activate code formatting manually by using the following key shortcut:
Automatic formattingVS.Php supports various ways to automatically auto format your code. Please note that this options are fully configurable in the Php's text editor properties. The following will trigger auto formatting: |



