This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The "Project Properties" dialog includes a field for "Index File." However, nowhere is it explained how this file is used, or what it's for. Is it the index file of a website? But the index file might have nothing at all to do with the URL being debugged. e.g. /var/www/example/index.php might be the "index file", but you might want to debug the script at /var/www/example/admin/add_user.php. Also, putting values into this field affect the URL being debugged, even though (for example) Apache rewriting may have completely altered the relationship between files on disk, and URLs. For example, if I have Project URL: http://google.com/search/ Index File: (blank) Arguments: q=foo I get the "Preview URL" http://google.com/search?q=foo However, if I then supply the "Index File", to reflect the file that is actually run when that URL is hit e.g. Index File: search.php then the "Preview URL" is changed to http://google.com/search/bootstrap.php?q=foo which is completely wrong! In this case the Index File has no relationship to the URL! I think this panel should be changed so that the user can enter the URL they want to be loaded in the browser (excluding the XDEBUG_SESSION_START parameter), instead of the NetBeans constructing the URL in a fairly mystifying manner from the values of three distinct fields.
Created attachment 86745 [details] project properties
"Index File" is used for "Run Project" action. If it's not clear, then it should be probably fixed in documentation. Please evaluate, thanks.
Hey Jeff, could you have a look on this, please? Thanks a lot!
I just re-read this and perhaps the issue is not clear. (The screenshot is perhaps clearer.) In summary: what I want to do is start a debug session on the URL http://www.example.com/search?q=foo&XDEBUG_SESSION_START=XXXX How do I achieve this? In particular, what goes into the "Project URL", "Index File" and "Arguments" fields? (Suppose, if this is necessary, that the file that gets run after Apache's rewrite rules have been processed is /var/www/htdocs/mysearch.php, and that I've previously established the mapping between "server path" and the "project path" via the "Advanced Web Configuration" window.)
> In summary: what I want to do is start a debug session on the URL > http://www.example.com/search?q=foo&XDEBUG_SESSION_START=XXXX > How do I achieve this? For these ("custom") URLs, please use Project Properties > Run Configuration > Advanced... > Debug URL > Ask Every Time (last URLs are remembered). This is useful for rewrite for example.
I will 1. Think of how to change Index File option on wizard, and 2. Add section to debug.html web tutorial and possibly javahelp on setting debug URLs. Have to evaluate further.
ithinkihavea cat, Your screenshot renders as a bunch of ASCII, so it isn't very useful. Did you specify the correct MIME type when you attached it? I've added the following section to debug.html. However, all the issues in this bug are covered in the Path Mapping blog post. This post explicitly describes the use of the Debug URL radio buttons on the Advanced Configuration dialog. I've looked at the javahelp and it seems quite complete as well. Therefore I'm marking this as FIXED. Guys, if you want me to alter anything in the section quoted below, please write me outside of this bug. Path Mapping, Debugger Proxy, and Starting a Debug Session on a Custom URL It is possible to debug both scripts and web pages, and web pages can be debugged either locally or remotely. For Remote Debugging, unfortunately the debugged php file on the remote server isn't the same as the file opened in NetBeans IDE running on a local machine. Debugger support in NetBeans must thus be able to map server paths to local paths. However, due to many complications, path mapping cannot be resolved automatically for every individual scenario. Therefore, starting in NetBeans 6.7 you can manually define path mapping through the project setup for individual run configurations. You can also specify the proxy server, if any, and the URL at which the debugging session starts. If you do not specify this URL, debugging starts at your index file. To set up path mapping and enable custom debugging URLs: Right-click the project's node in the Projects window and open the project's Properties from the context menu. In the Project Properties dialog, go to the Run Configuration category. Click the Advanced button. The Advanced Web Configuration dialog opens. Add the server path and the project path for path mapping. Under "Debug URL", select one of the following (do not leave the default selected): Ask Every Time, which has the IDE prompt you for the URL when you start a debugging session. Do Not Open Web Browser, which requires you to open the browser and enter the URL manually (you need the GET/POST XDEBUG_SESSION_START variable). If you are using a proxy server for debugging, enter the server's host name and port in the Debugger Proxy section. For more information, please see the Path Mapping in PHP Debugger post in the Net Beans for PHP blog.