Use Editplus2's user tool to debug PHP in real time

Source: Internet
Author: User

After reading the FonTomas "using Editplus to realize J2SDK visual programming" (see the http://www.csdn.net/Develop/article/15/15416.shtm) article, the author as a PHP programmer, developed the idea of letting Editplus debug PHP program. After my tests and N tests, Editplus can finally implement this function perfectly. The specific implementation method is as follows:

1. open Editplus and choose Tool> Configure User Tools... (configure user tools) "menu (The author is now using the version of V2.11 English version, this site (http://www.phpe.net) download columns have downloaded using the Chinese version of friends can see the following picture comparison ).
498) this. width = 498; 'onmousewheel = 'javascript: return big (this) 'height = 249 src = "http://www.study888.com/computer/UploadFiles/200504/20050405003024175.gif" width = 518>

2. in the pop-up window, select "Add Tool (New Tool)-> Program (Program)" to give a memorable name to the new Program. For example, here we use "Debug PHP ", enter "Debug PHP" in Menutext ". Click the button on the right of "Command (Command line)" to find the path of your php.exe, which is "c: phpphp.exe ". Click the drop-down button on the right of "Argument (parameter)" to select FilePath, and then select the check box before "Capture output (Capture output.
498) this. width = 498; 'onmousewheel = 'javascript: return big (this) 'height = 384 src = "http://www.study888.com/computer/UploadFiles/200504/20050405003025556.gif" width = 482>

3. test now. Create a New php file. Press Ctrl + 1 to activate the tool we just set. (If you set multiple tools, the 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 the first line of error. Double-click this line to prompt that Editplus always prompts you that you cannot find a 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 "output Pattern" next to the Capture Output check box... (output mode) "button will pop up a form that defines the output mode, remove the check box before" Use default output pattern (Use default output mode, enter "^. + in (. +) line ([0-9] +) "(excluding quotation marks). Careful friends may find that the regular syntax is used here. Then, select "Tagged Expression 1" in the "File name" drop-down menu below, that is, the first parameter in the above regular Expression, "Line (number of rows) select Tagged Expression 2 from the drop-down menu and leave the drop-down item "Column" empty. Save the settings.
498) this. width = 498; 'onmousewheel = 'javascript: return big (this) 'height = 205 src = "http://www.study888.com/computer/UploadFiles/200504/20050405003025430.gif" width = 350>

5. 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 ?!
498) this. width = 498; 'onmousewheel = 'javascript: return big (this) 'height = 399 src = "http://www.study888.com/computer/UploadFiles/200504/20050405003025998.gif" width = 690>

Now, Editplus has gone through our "transformation" to debug PHP files in real time. Although it is not a "visualized" interface, it is very useful for common small programs to find errors. Editplus is really a rare tool. If you have any tips, don't forget to share it with everyone.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.