1: Open editplus and select "Tools"> Configure user tools.
2: In the displayed window, select "add tool-> application Program ", give the new program a memorable name. For example, we use "Debug PHP" and enter "Debug PHP" in "menu text ". Click the button on the right of "command line" to find the path of your php.exe, for example, "C:/PHP/php.exe ". Click the drop-down button on the right of "parameter" and select "file path". Then, select the check box before "Capture output.
3: test it now. Create a PHP file and press Ctrl + 1 to activate the tool we just set. (If you have set multiple tools, shortcut Keys may be different). Now you can see that it is working properly. However, it is not ideal: If your PHP program fails, the output window will prompt you For the first line of error. If you click this line of prompt, editplus will always prompt you that you cannot find the XX file, whether to create. Next, we need to modify this function.
4: Open the user Tool Setting window and find the "Debug PHP" tool you just set. Click the "output mode" button next to the "Capture output" check box to display a form that defines the output mode. Remove the check box before "use default output mode, enter "^. + in (. +) line ([0-9] +) "(excluding quotation marks), careful friends may find that the regular expression syntax is also used here. Then, select "default expression 1" from the "file name" drop-down menu, that is, the first parameter in the above regular expression, and select "default expression 2" from the "row" drop-down menu ", the drop-down list of "column" remains empty. Save the settings.
5: Okay. Now, let's try again. Double-click the number of wrong lines. editplus will automatically activate the error file and position the cursor to the wrong line. Is it especially convenient ?!
now, editplus has gone through our "transformation" and can debug PHP files instantly. Although it is not "visualized, but for some common small programs to find the error is still very useful. Editplus is really a rare tool. If you have any tips, don't forget to share it with everyone. ^ O ^
If you cannot switch the wrong line number, try to make the following changes: (by aukw)
1. Open html_errors = off in PHP. ini
// If you do not open it, the expression in 3. must be modified.
2. Change the parameter to-Q-F "$ (filepath )"
// If there is no space in the file name, debugging fails ..
//-Q does not output HTML header information. You can also remove it, But you generally do not use the header information during debugging.
3. "^. + in (. +) line ([0-9] +) "changed to" ^. + in (. +) on line ([0-9] +) $"
// If the problem persists, pay attention to the debugging result and modify the expression to retrieve the file name and row number.
3. Build a PHP debugging environment (2)
1. Locate the editing library on PhP4 functions and use the [insert]-> [Match editing] command during editing, you can automatically enter the complete PHP function at the end (or press the F2 key directly)
2: similar to the above, you can also automatically complete the selection of some text. (Same as F2)
3: In [Parameter Selection]-> [settings and syntax]-> PHP-> Automatic completion, select the php. ACP file under the directory, and you can customize your own Automatic completion method.
4: to preview files in real time, go to [Parameter Selection]-> [tools]-> Web server to add a local directory (do not add http ://, should be a valid site ).
For example, host-> localhost/PHP | root directory-> D:/PHP
Host-> localhost/asp | root directory-> D:/asp
Host-> localhost/cgi | root directory-> D:/cgi
After setting, the script file can be correctly interpreted as long as it is located in these directories (the subdirectories are OK.
5: a variety of syntax and template files can be obtained in the http://www.editplus.com/, can be selected and edited as needed.
6. Press Ctrl + F11 to display the function list in the current file.
7. add various user tools, such:
Start the MySQL server management tool-> C:/MySQL/bin/winmysqladmin.exe
Start Apache server-> C:/Apache/bin/apache.exe-K start
Start Apache server-> C:/Apache/bin/apache.exe-K stop (shutdown)
8: dbg comes with a prof_results.php file that analyzes the performance of the PHP program.
Although it is not a real debugger, It is enough.
OK! After the transformation, is it a bit like an IDE? Almost, no immediate help... view me, come back:
9: Add php_manual_en.chm (preferably the extended help manual) to the user tool. When you encounter a keyword that needs to be referenced, move the cursor to it and press the shortcut key Ctrl + 1. Have you seen it.
When you enter a function name that cannot be thought of, call up the function according to the first 1st methods. Then... how?
Some of the above are the settings for debugging tools. Because there are many such tools, you can refer to the above for more basic settings, so there is no more list.