Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude other scripts from debugging in PhpStorm

When I start debugging and use another script on the server (e.g. Adminer), i.e. a script outside the project that is not intended to be debugged, the script is paused by PhpStorm and following two warning appear:

  • The script '[path to script]' is outside the project.
  • Click to set up path mappings

Now, I have to press F9 (i.e. resume) to continue script execution. It is very annoying. Can I just exclude these scripts from debugging?

like image 361
v6ak Avatar asked May 25 '13 09:05

v6ak


People also ask

Which hotkeys do you use for managing debugging session in PhpStorm?

Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Debugger. In the Built-in server area, specify the port where the built-in web server runs. By default this port is set to the default PhpStorm port 63342 through which PhpStorm accepts connections from services.

How do I enable debug mode in PhpStorm?

Launch the Debugger Before launching the debugger, make sure that either a breakpoint is set or the Break at first line in PHP scripts option is enabled on the Debug page of the Settings/Preferences dialog Ctrl+Alt+S . on the PhpStorm toolbar. Press Alt+Shift+F9 . Select Run | Debug from the main menu.

How does Xdebug work with PhpStorm?

PhpStorm supports the use of Xdebug in the Just-In-Time (JIT) mode so it is not attached to your code all the time but connects to PhpStorm only when an error occurs or an exception is thrown. Depending on the Xdebug version used, this operation mode is toggled through the following settings: Xdebug 2 uses the xdebug .

What is enable and configure these Xdebug features?

If you set the XDEBUG_CONFIG environment variable to any value, then Xdebug will also get activated. Debug session management for Step Debugging is also available through XDEBUG_SESSION_START . With xdebug. trigger_value you can control which specific trigger value will activate the trigger.


1 Answers

There are few options just for that at Settings | PHP | Debug | Xdebug

  • Force break at first line when no path mapping specified
  • Force break at first line when a script is outside of project

There is also Settings | PHP | Debug | Skipped Paths, which can be useful in other scenarios when you want to ignore debug requests that were initiated for specific URL, but still debug other URLs. Help page here.

like image 118
LazyOne Avatar answered Sep 30 '22 04:09

LazyOne