1

Trying to debug my web site, I hit "Debug Project", get a browser window opened up, and the debugger stops at the first line of the index.php file (which is the root document). Pushing Continue always stops at the same line. It seems that every Get or Post is causing the debugger to stop there and I have to push Continue multiple times to get the site to show anything. I did not place any breakpoint on index.php.

Another thing is that all images are missing from the browser that shows the debuged site.

Thanks! Avi

1 Answer 1

2

For your first issue, that's a configurable thing. Some people like it. I find it as annoying as you do. Do this:

  • Click on Tools, then Options, and then on the PHP icon in the option dialog's toolbar.
  • Make sure the General tab is selected.
  • In the Debugging section, un-check "Stop at first line"

That should set it to continue until it hits a breakpoint that you explicitly set. Re-check it if you are having issues before the first line of project code is executed, so you can see the initial state before execution.

For your second issue, I don't remember ever seeing something like that. It sounds like something on the server side is possibly not configured properly? Maybe something about the run configuration is not set right? To look at the run configuration:

  • Right-click on the top-most project node in the Projects tab over on the left.
  • Click on Properties
  • Choose Run Configuration under Categories.

As an example, my PHP project is Run As a Remote Web Site; the Project URL is http://www.example.com/ (yours will point to your test server, maybe localhost?); the Index File is src/index.php because my project is run from the /src subdirectory on the server (to match the fact that our version control has the main directory of the source code under /src); I don't need any Arguments.

Sign up to request clarification or add additional context in comments.

11 Comments

Thanks a lot Robert. The first problem is resolved. Regarding the missing images, it looks like Apache is not obeying the .htaccess file when on debug mode, and runs Zend index.php in spite the file to be fetched is of type .jpg (my .htaccess has RewriteRule !\.(js|ico|gif|jpg|png|css|swf)$ index.php). Any idea why that could happen?
RewriteRule !.+\.(js|ico|gif|jpg|png|css|swf)$ index.php you need the filename part in the rule. .+ is "one or more of any char"
actually, what you had should have worked too, since you didn't have !^. But give the other suggestion a try
By the way, to see what mod_rewrite is thinking do RewriteLog /path/to/rewrite.log and RewriteLogLevel 3 (or 2 or 4). Just remember to set RewriteLogLevel back to 0 when you whip mod_rewrite into shape. Rewrite logging can seriously slow things down.
As you've guessed, your new rewriterule format did not help )-: I tried to do the logging, but got a "RewriteLogLevel not allowed here" on apache_error file. Can it be that the RewriteRule needs to include extra set of characters after the jpg and png as the URL on debug mode contains extra characters at the end?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.