X

An Oracle blog about NetBeans for PHP

Run file without project

Guest Author

Today, I would like to introduce an improvement that is related to PHP files which do not belong to any PHP project. In NetBeans, these files can be not only opened but also run or even debugged. Just open a file, right click in the file content and choose Run File (SHIFT + F6) and the following dialog appears:

Run File dialog

As you can see, one can provide script parameters, change working directory or even specify PHP parameters (useful, for example, if one wants to change PHP include path). If one runs the script always with the same parameters, it is useful to remember these settings so the IDE does not ask you again.

Similarly, if one wants to debug an opened file (CTRL + SHIFT + F5):

Debug file dialog

As you can see, the same dialog is used.

One more note - because the files do not belong to any PHP project, running (or debugging) is done only via the PHP command line interpreter (can be found in Tools > Options > PHP > General). This means that the output can be reviewed in the Output window:

The Output Window

That's all for today, as always, please test it and report all the issues or enhancements you find in NetBeans Bugzilla (component php, subcomponent Project). Please notice that if you write a comment here but do not report a bug or enhancement, nothing will probably happen ;)

Join the discussion

Comments ( 6 )
  • MySchizoBuddy Tuesday, June 29, 2010

    Offtopic:

    What does the roadmap look like after the 6.9 release. Is it 6.10 incremental update or 7.0 major upgrade.


  • Hantsy Wednesday, June 30, 2010

    Why netbeans has no plan to design a united GUI for Run/Debug/Profile configuration which provided in IDEA and eclipse.

    I have filed an issue about this.

    https://netbeans.org/bugzilla/show_bug.cgi?id=168208


  • Hantsy Wednesday, June 30, 2010

    @MySchizoBuddy I also ask the same problem in the netbeans dev maillist, but have not got clear answer.


  • Nexik Friday, July 2, 2010

    I don't know where to report this, so I post it here:

    After updating Netbeans to 6.9 sometimes after choosing code completion from the list IDE is freeze for several second.

    After freeze all text I write before Code Completion is removed.

    Example

    $this->che [Ctrl+space] [selecting check_name()]

    IDE freeze for 5-10 sec. After that my text was changed to:

    $this->

    I happens 1-3 times a day, but this is very annoying :(


  • Tomas Mysik Friday, July 2, 2010

    To Nexik:

    Have a look at the blog post, there's a link to NetBeans' BugZilla (the place where to report issues).


  • guest Wednesday, May 11, 2011
    Awesome. Keep up the good work, Netbeans.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha