Is debugged application running on its own thread? |
Guru master
|
PhpED is a multi-threaded application (as are probably nearly all Windows applications) and the debugged 'application' is running in a separate process (eg NuSphere Server or Apache, and PHP itself which can run as an additional process).
However, that still does not mean you can 'break' into debugged PHP code that is running in an infinite loop. If you turn off PHP script timeouts and cause an infinite loop in your PHP code, you might have to kill the host process for PHP (eg Server or the Apache httpd process). PhpED might appear to hang while the code is looping, but killing the PHP host process normally allows you to regain control of PhpED. I don't use the NuSphere Server, but I seem to remember it has a fixed timeout of some sort. I also don't use PHP with IIS, but you can probably place the web server in its own IIS application pool and recycling the pool will reset the corresponding process. |
||||||||||||
|
Site Admin
|
> you can 'break' into debugged PHP code that is running in an infinite loop
in fact you can. That's what PAUSE button for. It breaks, not so fast, but it works and breaks infinite loops. what it can't break is such thing as hanged up connections, long SQL query, and stalled read/write operation -- whereever no loops in php happen. |
||||||||||||
_________________ The PHP IDE team |
Guru master
|
I've just entered this code and debugged the page:
I can see the httpd process looping away, but in PhpED the Pause button is disabled. Ahh, I see. It looks like I had to have at least one breakpoint actually happen before the Pause button become enabled. Is there a way of getting Pause to work without having a breakpoint? |
||||||||||||||
|
Site Admin
|
You don't need any breakpoints to have the Pause working. What you need is your code running with debugger. If you don't run with debugger, the debugger has nothing to do with your code execution flow.
|
||||||||||||
_________________ The PHP IDE team |
Guru master
|
If I click the Run in debugger (F9) button, the browser appears, the code runs and the pause button stays disabled.
If I have a break point get executed before or within the loop, the pause button is disabled, execution stops, then when I continue execution the pause buttons enables. I can then click the pause button. |
||||||||||||
|
Site Admin
|
if it is not enabled, means that the code finished. Check View->Debug windows->Debug Session
If it is empty, there is no debug session running with this IDE and therefore Pause button has nothing to pause. Also this button is inactive when the debugger is waiting for your input such as Step-In, Continue, etc, so it's effectively paused and it can't be paused more than this. Anyway I'm telling you how it's supposed to work and actually works for me. If you experienced something else and you think it's a bug, submit a ticket here: http://www.nusphere.com/contact_us/ |
||||||||||||
_________________ The PHP IDE team |
Site Admin
|
update:
regarding status of the buttons while running scripts with and without breakpoints. Please check View->Debug Windows->Debug Sessions. It may happen that debug session was started but didn't come in to foreground (remain in-active). Try to double-click it. update: the situation with inability to Pause or correctly Stop endless or long loops is fixed phped v6 6029/dbg 4.0.4 See changelog changes60.htm |
||||||||||||
_________________ The PHP IDE team |
Is debugged application running on its own thread? |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by