NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
General debugging question


Joined: 05 May 2006
Posts: 5
Reply with quote
When debugging is being done remotely and being started from an external browser, how does the debugger communicate which script is being executed to PHPED debugging client? Does the debugger notify the client about which script is being run with every command? How does PHPED match the debugger information to the local scripts in PHPED?

What if PHPED’s copy of the script isn’t exactly the same as the one on the server? Will I notice an error? Will the error be seen in the external browser or in PHPED?

Unless your answers to the above questions changes my understanding of how debugging works, I am assuming that I could place a break point in one of my php pages and use an external browser to brows through few pages until I hit the php page that has the break point. At that point PHPED will show me all the debugging information and the external browser will hang until the script is resumed.

Also, I am assuming that during the above scenario, when the break point is reached I will be able to change variable values on the remote server and resume execution. Am I correct?

All this could be done through a secure connection to the server? I read something about using SSH for this but I still need to further look into that. I will not be able to let the remote server to start a connection to the client on my machine since I have a firewall that blocks all incoming connections.

Thank you,
Shahim
View user's profileFind all posts by ShahimSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
What if PHPED’s copy of the script isn’t exactly the same as the one on the server?

They have to match. If they don't, you'll see real remote file executed while bogus local file shown in the IDE. There are many ways to synchronize content of remote host with local projects. Don't hesitate to read FAQ forum.
Quote:
Will the error be seen in the external browser or in PHPED?

Actually, it does not really matter who initiated the HTTP request, in both cases you'll get exactly the same results.

Quote:
...At that point PHPED will show me all the debugging information and the external browser will hang until the script is resumed

there is FAQ forum on this board where you can read how to initiate debug session. Once debug session is started breakpoint and other things make sense, otherwise not.

Quote:
All this could be done through a secure connection to the server?

No. By default connection is insecure. You have to use SSH tunneling if you need secure channel.
Quote:
I will not be able to let the remote server to start a connection to the client on my machine since I have a firewall that blocks all incoming connections

That's another reason to use SSH. When it used, connection is originated from the client computer, not from the server and therefore firewall will play its role perfectly well.
Alternatively, if your firewall supports NATing, you could add PORT forwarding and allow server to reach your workstation by this port.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 05 May 2006
Posts: 5
Reply with quote
Quote:
They have to match. If they don't, you'll see real remote file executed while bogus local file shown in the IDE. There are many ways to synchronize content of remote host with local projects. Don't hesitate to read FAQ forum.


I know that it is important and easy to synchronize content but I am assuming that I might make a mistake and there is a discrepancy. In that situation, will I get some kind of warning from the PHPED or from the web browser?

From what you said it seems that the debugging session will continue despite the discrepancy and what I see in PHPED will not match what is happening on the server. In that case, how will a break point on line 50 be interpreted if line 50 in PHPED is different from line 50 on the server?


Thank you,
Shahim
View user's profileFind all posts by ShahimSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
I know that it is important and easy to synchronize content but I am assuming that I might make a mistake and there is a discrepancy. In that situation, will I get some kind of warning from the PHPED or from the web browser?

No. You won't get any warnings. To check if files are synchronized and synchronize them just use Smart Sync or Smart Upload features.
It's the same if you did not save editor buffer. Disk copy will be different and nobody would warn you that they are not the same. Keep in mind that you need to click Upload instead of Save and you'll save you time and nerves.
Quote:
In that case, how will a break point on line 50 be interpreted if line 50 in PHPED is different from line 50 on the server?

By its line number.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
General debugging question
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