NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Two debuggers running against same server


Joined: 18 Oct 2006
Posts: 75
Reply with quote
A colleague and I are running NuSphere php debug sessions against the same server. I have updated the servers php.ini file to include a port for each of us ( I left my colleague with the default 7869 and I took 7868).
I assigned port 7868 to my setup while running through the settings wizard and it got right through the the end successfully. We were both subsequently able to debug independently so all good so far.

However, when I need to use the JIT debugger to check that a remote webservice was calling one of my php scripts, I added DebugBreak('1@127.0.0.1:7868'); to the script but the debugger never started. I know the
remote service called the script because it is set up to also email me with the details it posted to my script.

Have I missed something in the setup?

Thanks,
Nick
View user's profileFind all posts by nickweaversSend private messageVisit poster's websiteYahoo Messenger
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
Are you running PhpED on the same server where PHP is running?

If you use DebugBreak('1@127.0.0.1:7868'); then that will look for a debug listener on the web server. For a lot of single developers working on a single computer that will be correct. DebugBreak() without any parameters does the same thing but using the default port.

If you use DebugBreak('1@x.x.x.x:7868'); where x.x.x.x is an IP address of a workstation, then that will look for a debug listener on that computer.
View user's profileFind all posts by plugnplaySend private message


Joined: 18 Oct 2006
Posts: 75
Reply with quote
The DebugBreak('1@127.0.0.1:7868'); setting is correct if you are connecting through an SSH tunnel between the remote server running the debugger and your PC running PhpEd with the listener.

I'm thinking it may have been a setup problem though and just need my colleague to get back so we can reattempt the parallel debug sessions.

Thank
View user's profileFind all posts by nickweaversSend private messageVisit poster's websiteYahoo Messenger
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
I haven't tried it, but I'm unsure about that. Surely the NuSphere DBG module sees address 127.0.0.1 as being the local web server? That is running within PHP, so PHP will see 127.0.0.1 as a loopback address. Doesn't matter if you are using SSH tunnel or not, any network request to 127.0.0.1 on the web server still sees a loopback to itself?
View user's profileFind all posts by plugnplaySend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
Having said that and thought a second longer, yes, 127.0.0.1 is local but then the port could then send back through the tunnel.
View user's profileFind all posts by plugnplaySend private message


Joined: 18 Oct 2006
Posts: 75
Reply with quote
I'm not that knowledgeable when it comes to networking, but it's my understanding that when electing to use tunneling, you have told the server and client to use ssh under which you've set your tunnel (in Accounts->Tunnel (SSH) accounts). They both look for their own ends of it, ie both look on 127.0.0.1 for port 22. The Debugger packets are sent there where they are wrapped (by ssh) in encrypted packets but the internal packets still have their destination IP addresses so when decrypted and unwrapped at the receiving end, the final routing can be performed. If I'm wrong on any of this I'm very happy to be told so and have my understanding corrected.

Anyway, thanks for reading my post and taking the effort to help.
View user's profileFind all posts by nickweaversSend private messageVisit poster's websiteYahoo Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8351
Reply with quote
Nick, JIT (if it's really JIT you're talking about) triggers new debug session on errors or on exceptions. You can specify what errors (actually level of) and/or exceptions should trigger it in php.ini. If neither occur in run-time, JIT is passive and does not start any debug sessions.
If you're using DebugBreak(xxxx) --- that's not JIT. We can call it embedded break point or something like that. JIT abbreviation stands for "J"ust "I"n "T"ime, meaning trigger with errors.
As of DebugBreak() -- make sure that IDE started, project is active, and tunnel is open. Then check if corresponding port (7868?) is in LISTEN state on the server and bound to loopback (127.0.0.1) address.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 18 Oct 2006
Posts: 75
Reply with quote
Hi Dmitri, thanks for setting me straight on JIT versus DebugBreak(xxxx).

It was just bad user setup I'm afraid. Sorry to have wasted peoples time, but glad to see the NuSphere community come to my help nonetheless! Smile
View user's profileFind all posts by nickweaversSend private messageVisit poster's websiteYahoo Messenger
Two debuggers running against same server
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