- [browser][windows] Download and install WampServer, save the application in the work folder (D:/Work/wamp64); if encounter error on missing VCRUNTIME140.dll, download it from MS Show archive.org snapshot , download either x64 or x86, install as admin; if still error after installing, then download the other file and install.
- [browser][windows]Download and install VS Code.
- [vscode] Configure PHP linting:
- File > Preferences > User Settings
- on the right window settings.json, see sample code 1
- The path can also be written as
"D:/Work/wamp64/bin/php/php5.6.25/php.exe"
- [vscode] Define the workspace:
- File > Open Folder...
- Select the folder that contains the workspace (D:\Work\Sxxxm\stars)
- Click the Explorer, first button on the left menu bar
- [vscode] Click the Extensions, the last button on the left menu bar and install extension Crane
- [vscode] Install extension ftp-synch
- F1 > type "init" > select Ftp-synch: Init,
- in the window ftp-synch.json, see sample code 2
- [vscode] In the Explorer pane, navigate and open a PHP file, do some editing, and ctrl-s to save, make sure that the changes is uploaded/ftp to the server
- [vscode] Git Commit
- on the blue status bar at the bottom, you can see the current branch
- click on the Git, the third button on the left menu bar
- you can type a commit message and commit
sample code 1:
{
"php.validate.executablePath": "D:\\Work\\wamp64\\bin\\php\\php5.6.25\\php.exe",
"php.validate.run": "onType"
}
sample code 2:
{
"remotePath": "/home/web/public_html/magento/emgsihe_devel",
"host": "10.1.57.40",
"username": "kiat",
"password": "",
"port": 26833,
"protocol": "sftp",
"uploadOnSave": true,
"passive": false,
"debug": false,
"privateKeyPath": "D:/Work/Sxxxx/stars_fz_openssh",
"ignore": [
"\\.vscode",
"\\.git"
]
}
The privateKeyPath must be in OpenSSH format. Use PuTTYgen > Conversions to export and save the file.
Posted by kiatng to Tricks (2016-11-25 10:05)