trzczy
trzczy

Reputation: 1491

Annoying warnings "Debug session was finished without being paused" in PhpStorm with Vagrant and Xdebug

I have properly running xdebug on vagrant on my local pc on Ubuntu. It shows its orange table with error info. My testing page is localhost:8030

In Chrome browser I have Xdebug helper.

The problem is that an annoying warning is displaying in PhpStorm each time I refresh the site:

Debug session was finished without being paused
It may be caused by path mappings misconfiguration or not synchronized local and remote projects.
To figure out the problem check path mappings configuration for 'localhost' server at PHP | Servers or enable Break at first line in PHP scripts option (from Run menu).

I have checked path mappings configuration for 'localhost' server at "PHP | Servers" and they are OK. My PhpStorm project directory is associated to default Vagrant directory /vagrant/web/.

Enabling Break at first line in PHP scripts option does help but it is kind of an opportunism I think.

How to get rid of these PhpStorm warnings?

Upvotes: 16

Views: 26557

Answers (3)

Daniel_Ranjbar
Daniel_Ranjbar

Reputation: 120

in my case it was path mapping problem. but my question always was, i am using wamp server, so everything is served locally for myself to debug, what does path mapping mean in this case cause there is no remote server... should i map File/Directory to itself? if so what is the point...

Altough my question is not answered, but it turned out that i had to do exactly that.

Solution: I had to copy paste exact value from File/directory to Absolute path on the server tab.(acording to imagephpstorm setting/PHP/servers/add one) I did it for main parent directory of my project

I also mapped my laravel/public folder to my wamp64/www/project-name folder because of the fact that public assets or index.php file should be accessible by anyone but laravel source code (main files eg controllers models and...) should not be in the public folder

thats it.

Upvotes: 1

loonighan
loonighan

Reputation: 500

For PhpStorm 2021.1.1 +

[Ctrl] + [Alt] + S Settings : Php -> Debug

Scroll to Advanced settings and expand

Uncheck option Notify if debug session was finished without being paused

Upvotes: 26

Derick
Derick

Reputation: 36784

It would do this if there are no breakpoints being hit when debugging the script. The "break at first line" probably prevents PhpStorm from issuing you the warning, but otherwise it does exactly the same.

In case you do have breakpoints configured, and PhpStorm doesn't stop on them, then it is likely that you have path mappings configured wrongly.

Using Xdebug's xdebug.remote_log=/tmp/xdebug.log setting/feature to see which breakpoints PhpStorm tries to set, and see whether it does so for the correct paths. They will up as breakpoint_set commands in the log file.

Upvotes: 12

Related Questions