Posted June 21st, 2010 by noeldillabough
I have some PHP code that responds to a post request, and I want to debug it in VS.PHP.
How do I set the headers (content-type, authorization etc) and the post data (arg1=value1&arg2=value2&arg3=value3)?
Also how do I simulate the server's url (instead of say 127.0.0.1 I could have www.myserver.com)
Basically when I run index.php I want to be able to access variables such as $_SERVER['HTTP_HOST'] and $_POST['arg']
juanc says:
You need to set the debugger to external mode and set the start url for your server
Also you need to configure XDebug in your server so that you can debug it. The auto start option is useful because you wouldn't have to set the query string to get debugging started.
Juan
noeldillabough says:
Oh you misunderstood my question, cool to know I can debug an external server with XDebug setup but in this case I have the server code local and want to simulate a post to my local debug session.
Right now it opens index.php?XDEBUG_SESSION_START=n
I want to set the headers and post content of that call, is there a way?
juanc says:
not that I'm aware of