NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debugging POST request from a page?
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Okay heres the situation:
clienthost = 192.168.0.100 (my pc running PHPED)
apache server = 192.168.0.2

I type in the url of a script in my browser with a DebugBreak ( ) call in it, the debugger breaks as it should.
A few lines further the script performs a POST to another script (in the same VHOST) by using CURL.
In the script receiving the post request is also a DebugBreak ( ) - I need to be able to debug both the originating and receiving script.
It fails giving me (short version):
Reason: Failed to connect to the client address 192.168.0.2:7869
Debugger request: "100@192.168.0.100:7869"
Request found in: "DebugBreak(arg)"

I already tried by setting the DBGSESSID to 1@192.168.0.100:7869 and other variants with or without d=1 or portnr etc etc, and by also passing it as
an argument to DebugBreak but it keeps on failing. Only thing that seems to work is by including it in the URL to post to.
I kinda scared that that doesn't work to well because it requires 2 debug sessions at once or something (which is confirmed by me having to stop the debugsession in the original script before it breaks into the post-script when i use the URL DBGSESSID)

It would be extremely handy if I can debug both scripts (without having to stop the one), because the data it is
supposed to get changes dynamically per page and it's nearly impossible to call it by hand to start the debug session there...

Hope that I explained the thing understandable and that you can help me! Thanks
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
DebugBreak() can be run with no arguments or with just one argument like below
DebugBreak('1@clienthost:7868;d=1');
it follows syntax supported by DBGSESSID.

Regarding two or more sessions, I understand what you're about.
yet, I'm sorry to say that you can debug only script that runs POST or script that is being called with POST.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Yeah that's what I figured, I can see it in the debug client log too... "delayed execution", if i debug the calling script first.
Anyway since only putting it in the post URL works for me i guess i'll have to do it like that. Life can't always be easy Wink
Thanks for the reply.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Debugging POST request from a page?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic