NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Multiple debugging sessions?


Joined: 23 Sep 2005
Posts: 6
Reply with quote
Hello there, I am trying to see if PhpEd is capable to spawn multiple debugging sessions.
I have code in file1.php executing file2.php script:
file1.php:

<?php

$request = 'http://localhost/file2.php';

// ... some stuff...

// Get the curl session object
$session = curl_init ($request);

// .... some more stuff....
$response = curl_exec($session);

curl_close($session);
echo $response;
?>

I can debug file1.php but having troubles to get *inside* file2.php and then getting back and continue debugging file1.php.

Is it technically possible with PhpEd?
I am using PhpEdit for it now (another software) - but wonder about PhpEd.

Gleb
View user's profileFind all posts by gesmanSend private message


Joined: 23 Sep 2005
Posts: 6
Reply with quote
More details about my environment:
I run Win XP, PhpEd 5.0 and here's what I added to php.ini following recommendations of dbg-wizard.php:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; PhpEd 5.5.x remote debugging feature.
zend_extension_ts=W:\www\php5\ext\php_dbg.dll-5.2.x
[debugger]
debugger.hosts_allow= 127.0.0.1 localhost
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Everything is correctly loaded. I set project settings according to suggestions and everything worked fine.
I run index.html with the following form in it:
<form action="http://localhost/_test/webservice/client.php?DBGSESSID=123;d=1,p=0,c=1" method="post" .........etc

When I click [submit] button to 'post' this form - I got 'client.php' correctly intercepted in the PhpEd debugger and i am able to debug it step by step.

My client.php has the following:

$request = 'http://localhost/_test/webservice/server.php?DBGSESSID=567;d=1,p=0,c=1';
...
$session = curl_init ($request);
...
$response = curl_exec ($session);
curl_close ($session);


I have 'server.php' loaded and breakpoints set at the beginning. When i execute 'curl_exec' line - debugger essentially 'hangs'. To un-hang it I'd have to (x)-stop execution of debugger (kill session) and ONLY AFTER THAT it spawns next session (number 567) - and i am able to debug server.php
The problem is that client.php session is lost.
I do have [x] Debug Sessions enabled in debug settings - and I thought it gives a possibility to have few sessions running simultaneously?

Could anyone please confirm/deny that?

Thanks,

(PS: I tried another tool - PhpEdit which does support multiple sessions - but I'd really love to make phpEd to work if possible)
Gleb
View user's profileFind all posts by gesmanSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
nested debug sessions aren't supported by PhpED v5.0
To debug far end, you have to run current script without debugger and somehow cause the remote script to trigger debug session. You may use all ways provided, including GET, POST, COOKIE, DebugBreak() and so forth.

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


Joined: 23 Sep 2005
Posts: 6
Reply with quote
Ok, thank you for your reply.
I ended up debugging one script at a time by adding/removing query strings from called script name as I progress (?DBGSESSID=...)

I compared pretty much all PHP development IDEs and have to admin PhpEd has a nicest interface and consistent behavior. For some reason other IDE's would change their behavior for no apparent reason and i end up wasting lots of time trying to fix things that breaks for no apparent reasons.
PhpEdit (from ) can run multiple debugging sessions but it won't let you change variables/strings during debugging which is really big miss for me.

Having uninterrupted debugging feature would be welcome addition though.

Gleb
View user's profileFind all posts by gesmanSend private message
Multiple debugging sessions?
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