Disable wait for debugging if no breakpoint is set

I am using latest version of PHPStorm.

PhpStorm 2017.1.3
Build #PS-171.4424.11, built on April 26, 2017
Licensed to <removed>

You have a perpetual fallback license for this version
Subscription is active until August 15, 2018

JRE: 1.8.0_112-release-736-b21 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

I'm debugging the web service API and do not use the plug-in for the browser, since all script calls come from third-party software. Also I had to set the debug mode and here's what my php.ini looks like:

[Xdebug]
xdebug.remote_enable = 1
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9001
xdebug.profiler_enable = 1
xdebug.remote_handler = dbgp
xdebug.profiler_output_dir = /tmp
xdebug.remote_autostart = 1
xdebug.remote_mode = req
xdebug.idekey = PHPSTORM

I click "start listening for php debug connections" and start debugging. Sometimes I do not need to debug a script, but the script itself is in debug waiting mode. This is usually treated by disabling "start listening for php debug connections" or by setting the stop point anywhere in the script and clicking on the "Resume" + "Stop" debugging panel.
How to disable the debugging mode if the script does not have any installed stop points and does not have the checkbox "Break at first line in PHP Scripts"?

1
2 comments

Hi there,

Could you please explain a bit on "but the script itself is in debug waiting mode." part?

I mean:

  • I'm using "phone handle" icon (listener) + browser extension for debugging web pages
  • If I forget to disable any of them and I do not have any breakpoints set .. I will just see "debug session finished without hitting any breakpoints" kind of message which I do not wish to disable (in case if I do actually forget to set breakpoint). NOTE: that's not exact wording but close enough to explain the overall message.
  • I do not have any "break at first line" options set (of any kind)

Based on that -- I do not see any "waiting" at all.

 

The only thing that comes into my mind -- your script calls another script (e.g. makes another request that gets executed as separate process/request by PHP/xdebug) where additional debug session is getting initialised .. and that's where "waiting" may be occurring. If so -- please increase the simultaneous session limit in PhpStorm settings (by default it is just 1).

 

>How to disable the debugging mode if the script does not have any installed stop points and does not have the checkbox "Break at first line in PHP Scripts"?

The best way is to disable listener/"phone handle" icon.

If you want IDE to ignore incoming debug request completely then you need to file a Feature Request ticket to the Issue Tracker  because as far as I know such functionality is simply not available (and such default behaviour makes sense: if I enable debugger for listening .. then I expect it to work or notify me if it does not instead of just silently ignoring the request).

1
Avatar
Permanently deleted user

Hi there,

The problem was solved. The script that was called by the program called in turn another script through the command: "proc_open ('exec php sample.php')" and this script was waiting for debugging.

But debugging could not begin because of the "Max simultaneous connections" setting, which defaults to "1". After increasing the value of this setting, I have earned both the main script and debugging in scripts called via proc_open.

Many thanks to the developers of phpstorm is a great tool!

0

Please sign in to leave a comment.