Use the EDITPLUS2 user Tools feature to debug php_php instantly

Source: Internet
Author: User
Keywords instant Debug function tool user exploit editplus ph
EditPlus

P> saw Fontomas's "visual programming with EditPlus for J2SDK" (see http://www.csdn.net/Develop/article/15/15416.shtm), the author is a PHP programmer, Germination of the idea of letting EditPlus debug PHP programs. After my test with N (N>10) test, finally can let editplus perfect to achieve this function. The implementation method is as follows:

1. Open EditPlus, select tool (Tools)->configure User tools ... (Configure user tools) menu (the author now uses the version is V2.11 English version, this site (http://www.hooday.com) Download section has the download to use the Chinese version of the friend can see the picture control below).


2. In the pop-up window, select "Add tool (->program)" To give the new program a good name, such as here we use "Debug PHP", in the MenuText (menu text) input "debug PHP." Click on the "command line" button to the right to find the path of your php.exe, here is "C:\php\php.exe". Then click the drop-down button to the right of "Argument (Parameters)" To select filepath (file path), and then choose the checkbox in front of "capture output".


3. Now test, create a new PHP file, press the shortcut key ctrl+1 can activate the tool we set up just now (if you set up a number of tools, shortcut keys may be different), now you can see that it is working properly. But there is not ideal: if your PHP program error, in the Output window will prompt you the first few lines of error, click this line prompt, EditPlus always prompt you can not find a file, whether new. Next we want to fix this feature.
4. Open the User Tool Settings window and locate the "Debug PHP" tool that you just set up. Click the "Output Pattern ..." next to the Capture output check box. (output mode) button pops up a form that defines the output mode, strips out the check box in front of the Use default output pattern (using the defaults), and enters "^" in the text box of the Regular expression (regular expression) item. + in (. +) line ([0-9]+) "(not including quotes), attentive friends may find that the syntax used here is also regular expression. Then, in the "File name File name" drop-down menu below, select "Tagged expression 1", that is, the first parameter in the top regular expression, the "line (number of lines)" drop-down menu item Select "Tagged expression 2", "Column" The drop-down item remains empty. Then save the settings.


5. OK, now try again, double-click the number of rows of error, EditPlus will automatically activate the error file, and the cursor to the wrong line, is not particularly convenient?! (Click to enlarge)


Now, editplus through our "transformation", has been able to immediately debug PHP files, although not "visual" interface, but for some ordinary small procedures to check the wrong or very useful. EditPlus is really not a good tool, if you have any use of skills, do not forget to share with you oh. ^O^ Chin A

  • 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.