Debug PHP command line script in PHPStorm -
I use debugging as my primary device for PHP and am very happy. So far I'm using Firefox to run the script, and the PHPStor breaks completely.
Now I have a situation where I am running a PHP script through the command line (not the browser) and want to know that there is a way to setup PHPStorm to break when the command line Running a PHP script from?
It is possible to debug with the Php Remote Debug configuration. Note that there is an error in this tutorial, you need to set QUERY_STRING like this on Windows (): (which is important to note the difference in quoted). Set up PhpStorm as shown on the screenshot: debug on the main toolbar button. Run your script in the command line: \ Work \ attaches \ sample \ help.php PhpStorm will affect breakpoints: It was tested on Windows with Zend server installation, but other systems and Should be similar with xdebug. If you want to debug directly from PhpStorm, use the Php script / debug configuration type. To configure for this project, your PHP instance configuration files should have Zend Debugger or Xdebug enabled. The PHP home and debugger mode can be specified in the Just work with me for Zend server installation (PHP home:
SET "QUERY_STRING = start_debug = 1 & debug_port = 10137 and debug_host = 127.0.0.1 and debugapp = 1 & amp; no_remote = 1 & amp; debug_session_id = 10000 "
D: \ dev \ zend \ ZendServer \ bin \ php.exe d: phpStorm will start listening for the debugger connection.
file | Settings | PHP .
D: \ dev \ zend \ ZendServer \ bin \ / code>) and Zend debugger has been verified
Comments
Post a Comment