Cihad Turhan
Cihad Turhan

Reputation: 2849

how to set xdebug HTTP request from another client

I'm using xdebug to debug a remote server. Let's say I have

How can I debug the requests sent by C2, on my pc C1 ?

Upvotes: 1

Views: 889

Answers (2)

Sergey Chizhik
Sergey Chizhik

Reputation: 617

I solved problem with this config:

# addr of server with debugger
xdebug.remote_host = 127.0.0.1  # or another debug server addr
xdebug.remote_port = 9000
xdebug.remote_enable = 1

# as you wish
xdebug.remote_autostart = 1

# must be set to 0!
xdebug.remote_connect_back = 0

So, if some client connecting to server, server will attempt to connect to remote_host. In this case remote_host might be server addr.

Upvotes: 0

Lauri Orgla
Lauri Orgla

Reputation: 561

I dont think you can do that. Because xdebug connects back to you. So if you request it on one machine, then it will try to connect to the same machine. Unless you have same ip-s. Edit:

The text below is for debugging on same server.

You must set unique session id for xdebug.

Example: XDEBUG_SESSION_START=my_unique_session_id

Source: here

Upvotes: 1

Related Questions