Skip to content

Remote debugging in worker mode #495

Closed Answered by hazadam
hazadam asked this question in Q&A
Discussion options

You must be logged in to vote

After having further discussions and digging deeper I discovered that there is actually a very simple solution to this. FrankenPHP passes ENV variables defined under given workers as $_SERVER variables into your php scripts. Once I had the "SERVER_NAME" variable set up, PHPStorm identified it and used the associated path mapping to let me debug my worker script just like I'm used to under "normal" circumstances.

ENVs are passed like this 🔽

	frankenphp {
	    num_threads 2
		worker {
		    file /app/public/index.php
		    num 1
		    env SERVER_NAME mailship.local
		}
	}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hazadam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants