0

I'd like to use PHPstorm and remote debugging on a production server but on a development virtual host on the same server. using apache 2.4 + PHP 5.5.

I have one production CPANEL server with several web applications (Drupal + Wordpress.) I have a local dev environment that never quite matches production (for a variety of reasons.) I have read lot's of warnings about not using xdebug on production but I would like to make a distinction about the server and the virtual host.

ref:

If load xdebug.so in the standard php.ini and disable it, will it affect performance on production (I imagine there may be some memory increase for apache) I also will have zend optimizer loaded and enabled.

For my development virtual host, I can disable zend optimization and enable the xdebuger.

I can see two ways to do this, either in .httacces (as in How can I use xdebug to debug only one virtual host?) or have a special php.ini just for the development application.

  1. What is preferred approach / tradeoff?
  2. Will production performance be affected?
  3. Is this a reasonable approach?

If the local php.ini can disable the debugger, will there be performance risk if it is loaded? Can the php.ini just load it for a specific (dev) web application?

Other approaches could be to run a seperate instance of apache but I'm concerned its beyond my tiny brain :)

Community
  • 1
  • 1
Sonicthoughts
  • 548
  • 1
  • 4
  • 16
  • Your first problem is - Debug on production.. The second problem is - IDE Debug on production.. Please don't do such things use local/test env instead ! – Svetoslav Nov 25 '15 at 16:09
  • So far this has nothing to do with PhpStorm. Please consider removing "phpstorm" tag. – LazyOne Nov 25 '15 at 16:15
  • But in general: 1) PhpStorm (as any other IDE) does not care if your remote server is dev/test or production one -- they all treated the same (as remote). 2) if you need to debug something on production server .. better use traditional "write into log" approach (or some existing debug helper classes (that can generate nice HTML and integrate it into your page output)) -- much faster (will not mess with the rest code) + no need to deal with xdebug. – LazyOne Nov 25 '15 at 16:19
  • To clarify the word "product" can refer to the application or server. The server is production. The IDE is actually on an workstation (PHPStorm remote debugging) . The production server is quite big. I do not want to run xdebug on the virtual host of production server (i'm assuming using a different php.ini will disable it.) I realize PHPstorm may not be specifically involved, but believe it is a common use case. – Sonicthoughts Nov 25 '15 at 20:04
  • @Svetlio - Debug on production and IDE on production is not addressing the distinction I made in my question. – Sonicthoughts Nov 25 '15 at 20:08
  • @Sonicthoughts nothing personal, I made a comment not an answer.. – Svetoslav Nov 25 '15 at 20:19

0 Answers0