NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Realtime PHP editing when debugging (3rd Party HTTP Server)


Joined: 21 Aug 2007
Posts: 14
Reply with quote
Hi,

I am using the debugging feature in PHPEd, which seems brilliant so far - although I have a couple of questions:

1) I have set various breakpoints in various places which will get executed (this is in more than one file). I would expect the code to execute automatically right up until a breakpoint is reached, or a watch condition equates to true. When I start the debugging using the IE toolbar, the first thing that happens is the respective code module is opened, and a blue background appears on the first line of PHP code. I am pressing the following keys to control program flow:

F7 - Continue to the next statement to be executed normally (this seems to work)
F4 - Continue and execute all statements without stopping until a breakpoint is hit or watch turns true (this is labelled as 'Run to Cursor', which is clearly not what I need)

Can you tell me what I need to use instead of F4 to get the behaviour I need?

2) When I have found a bug, I was expecting to be able to modify the code line (whilst in debug mode), and then re-execute the line to see the difference it has made on the fly. This does not seem to work very well at all - am I meant to enable some kind of setting perhaps? I am using FTP for uploading to a 3rd Party web server (Apache) with DBG setup on.

Thanks,

Matthew
View user's profileFind all posts by binarymonkeySend private message
Re: Realtime PHP editing when debugging (3rd Party HTTP Serv


Joined: 14 Jun 2007
Posts: 67
Reply with quote
binarymonkey wrote:
1) I have set various breakpoints in various places which will get executed (this is in more than one file). I would expect the code to execute automatically right up until a breakpoint is reached, or a watch condition equates to true. When I start the debugging using the IE toolbar, the first thing that happens is the respective code module is opened, and a blue background appears on the first line of PHP code.

In settings, under the Debugger section, uncheck the "Stop on the first line after run" item to make the debugger run straight thru to your first breakpoint.
View user's profileFind all posts by CjungeSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
Quote:
Can you tell me what I need to use instead of F4 to get the behaviour I need?
Press F9, or click the "Run in debugger" button on the toolbar (green arrow). Execution will then continue to the next breakpoint or end of script.

Quote:
2) When I have found a bug, I was expecting to be able to modify the code line (whilst in debug mode), and then re-execute the line to see the difference it has made on the fly. This does not seem to work very well at all - am I meant to enable some kind of setting perhaps? I am using FTP for uploading to a 3rd Party web server (Apache) with DBG setup on.
I think is due of the way PHP itself is working -- it loads the whole script into memory first, and then communicates with DBG as you to step through the script. The only way to change the image of the script that PHP has in memory, would be to reload the script into PHP, and that means a starting new debug session. I agree that it would have been way cool if code changes were possible on the fly during a debugging session Cool

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 21 Aug 2007
Posts: 14
Reply with quote
Thanks very much for your help!

Much appreciated Wink

Matthew
View user's profileFind all posts by binarymonkeySend private message
Realtime PHP editing when debugging (3rd Party HTTP 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