NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debug ajax


Joined: 23 May 2009
Posts: 6
Reply with quote
Hello,

I have created some javascript code within my PHP source, let say index.php. The javascript code load some variables by using another PHP file, (ajax). When i run the PHP source with the debugger i start to debug index.php after the javascript code is executed my debugwindow doesn't show the debug information from index.pgp anymore but he shows the other php source.

So what i see in my debugwindow is a pulldown menu, created by the other PHP source, instead of my complete form which is build in index.php.

I hope this explantion makes any sense. I hope someone can help me.

Thanks in advance
View user's profileFind all posts by shefraSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
Quote:
after the javascript code is executed my debugwindow doesn't show the debug information from index.pgp anymore


It's my understanding that index.php is the script that produces/outputs javascript code, that subsequently runs ajax php code.
In most cases, javascript will run on the client at moment when index.php is almost finished or has already finished.
In latter case, debugger has nothing to show for index.php debug session because it is finished.
In former case, the ajax php code is overlapped with index.php debug session, so the debugger will show TWO sessions in View->Debug->Debug sessions.
Feel free to switch between these sessions in this window and step/continue according to your development neeeds.

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


Joined: 23 May 2009
Posts: 6
Reply with quote
Not exactly, i start javascript from index.php and i would expect the debug session returns to index.php after the javascript is executed, at least in the output window. Maybe some code will clear the situation:

underneath the last piece of my code:

Code:

echo '</td></tr>';
echo '<tr><td height="15" colspan="2"></td></tr>';   
echo '<tr><th colspan="2" align="right"><a href="javascript:showvacansies()">';
echo '<img src="images/search_text.png" alt="Toon gevonden vacatures" border="0"></a></th></tr>';
echo '</table></form><br><br>';
echo '<div id="div_vacansies" class="div_vacansies"></div>';


showvacancies execute an other PHP program. The result of this last PHP program is shown in the output tab instead of index.php What i see in the debug window is only the name of the PHP program which is debugged.

I used version 5.2 of NuSPhere and i can't remember this behavior in this version. Thanks again.
View user's profileFind all posts by shefraSend private message
Debug ajax
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