NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debug mode seems to switch to run mode


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
I'm using build 5632.
When doing a lot of debugging I find the debug mode switches to run mode, though it used to work differently.

For example:
In the output window I click a link or button
It stops on the first line as expected
I step through the code and find an error
I click the stop button to stop the debug mode
I fix the error and save
I switch back to the output window and click the link again (because I stopped the debugger before any output)
Now instead of stopping on the first line as expected the code runs through to end

I know this used to work differently (stopped on the first line after edit and save) but for the last few releases it doesn't do that anymore. I now have to start the whole application from the beginning again to get back to the point where I can click the link and step through the changed code. Is there something that's changed in the IDE, or some setting I've accidently changed? With the size of this app it's a real pain to have to restart the app from scratch every time I stop the debugger to make a change.
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
That's correct. When "debug session" feature is enabled, you can click on the links or buttons on the page that is produced with debugger to have the debugger triggered again. That's what we understand under "debug session". In some cases it's useful while in the others it's not. If you want to make some changes in the code and continue debugging, auto-triggering the debugger is useful. In the other cases you may want to open another tab and run for example mysqladmin that you don't want to debug at all, or you may want to run your site without debugging just to check the results. In these cases auto-triggering the debugger is quite annoying.
In version 5.6 button [Stop] not only terminates current debug, but also drops debugger cookie in the embedded browser. In other words it terminates debug session and further clicking on the page's links won't trigger debugger. If you want to keep session, click Run In Debugger (which means Continue). If you want to terminate session, click [Stop]. Well, it seems logical, doesn't it?

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


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
Thanks, at least it confirms this is quite a recent change.

So how do I manage the above debug sequence? How do I click a link after clicking the Stop button and at the same time click Run In Debugger? Currently the only options I've found are:
(a) Restart the entire application from scratch (can take many clicks to get back to the last debug point, and sometimes involves making db changes to get back to a particular starting status).
(b) Spot the error but let the debug continue to run through to end to remain in debug session, make the code changes, make any required db changes to undo what the last action did so I can get back to a particular starting status, click the Back button in the Output window, click the link to debug the updated code.

Both options are painfully tedious and drastically slows down the test-debug-update cycle. I'm hoping you can tell me about option (c) that will let me get back to the rapid test-debug-update operation I used to be able to do. Is there some internal setting I can change to keep me in debug session even if I click the Stop button, because I never need to do what you describe above, and I previously found I can jump out of the debug session anytime I want by clicking the Run button if I need to. It looks like the change in version 5.6 has removed my control of the debug session.
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
I'm sorry that your application is written in a way that requires "restart from scratch", but I'm not sure that we can help you with making your application friendly to your development. BTW, why do you need to run it from scratch? Why not to run the final script directly and debug it?
Regarding Run button, you can click on it and get your script running without debugger, that's correct. On the other hand, if you need to run another script (not currently opened), you'd have to open it first. As I mentioned before, it could be for example mysqladmin script and you may not have local copy of it to get it open. With [Stop] button worked in the old way, clicking on the links or openeing through URL would triggered the debugger. With the new way, debugger won't trigger and it's desired behaviour in this case. Right?

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


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
dmitri wrote:
I'm sorry that your application is written in a way that requires "restart from scratch", but I'm not sure that we can help you with making your application friendly to your development.


The page I'm debugging is the 5th page of a long form. The values of the previous pages are stored in a temp table, along with the sessionid etc. For me to get to the 5th form page with all the preceding values means I need to start the whole thing from scratch each time. Anyway it's not such an uncommon situation that there are several steps that have to happen, saving temp data along the way, before you get to the point where you want to debug. It's also has nothing to do with the application being "friendly" or not - these are real-world scenarios.


dmitri wrote:
BTW, why do you need to run it from scratch? Why not to run the final script directly and debug it?


Surely this is very common in web development. If I click a button I get all the form values submitted. How do I get these values into the app if I just "run the final script directly and debug it"? And how do I get all the required temp info set up again?


The issue really is that there used to be 2 purposes to the Stop button: (1) to stop the debugger because you don't want to debug anymore, and (2) to stop the debugger so you can fix something and then debug again. As it stands the second option has been removed. I would be very surprised if I was the only PhpEd user that stopped the debugger, made changes and then clicked the link/button in the output window to debug again. Would it not be possible to have some option that will allow you to choose what you want to happen when you click the Stop button?
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
Quote:
the issue really is that there used to be 2 purposes to the Stop button


aha, that's what I just realized too.
Will try to come up with an easier debugger session management in the next update (5633). Probably something like [Debug Session] checkbox like the one in the debugger toolbar for IE, will be more appropriate.

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


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
dmitri wrote:
Quote:
the issue really is that there used to be 2 purposes to the Stop button


aha, that's what I just realized too.
Will try to come up with an easier debugger session management in the next update (5633). Probably something like [Debug Session] checkbox like the one in the debugger toolbar for IE, will be more appropriate.


Thanks, I look forward to this update with anticipation.
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
ok, I'll send you the link via pm a bit later today.

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


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
Excellent, the update sorts the problem out perfectly. Thanks for your effort to resolve this so quickly - proves once again why PhpEd is such a great product.
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Debug mode seems to switch to run mode
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