app_dev.php并不总是令人耳目一新。 如何限制Netbeans / Browser显示最新版本的代码?

it's so annoying.

I'm working with Netbeans and Chrome (but other browers are not better) and i never know whether an error comes from last edited code or previosly edited.

app_dev.php suppose to take care of that, but its not.

I do not know whose cache is responsible for this: Netbeans, Symfony, Browsers.

How to contrain displaying latest version of my code?


edit

if do following steps its not work well:

  1. physically delete cache (even command cache:clear --env=dev)
  2. change code
  3. refresh site

if do following steps its work well:

  1. change code
  2. physically delete cache (dev)
  3. refresh site

Netbeans is an IDE. It will not cache any files I think. Try following this steps:

  1. Use Ctrl+F5 in Chrome to refresh the page with discarding the browser cache
  2. Execute php app/console cache:clear --env=dev after each source code modification
  3. Check your URL in browser address. It should be something like http://localhost/web/app_dev.php

@Olim pretty much covered it all. Only thing I would add is to try physically removing cache directory and running cache:clear again...

EDIT:

I had numerous problems with access rights of my IDE (phpStorm in my case) which could not alter files stored in Apache's default location (C:\Program Files\Apache...). The main cause was the dreaded Windows's UAC which prevented any program to write in some more sensitive locations.

To solve this you can either disable UAC or you could set the proper ownership:

  • Right click on you project's directory
  • Click Properties
  • Click the Security tab, then Advanced button
  • Switch to Owner tab and then Edit button
  • Click Other users and groups and enter your username. Click OK
  • Make sure you check the Replace owner on ....
  • Restart all related software (Netbeans, Chrome, Apache service...)

Does it work now?