NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
HOWTO: Run debug session ?
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
HOWTO: Run debug session ?

I. IDE
If you you have a project created in the PhpED IDE and use HTTP with 3rd party web server (run mode) or if this run mode is set to "SRV local WEB server" or "Local CGI", you can open PHP script your want to debug in the editor and click "Run in debugger (F9)":

After debug session is finished and you get your page rendered in the browser all subsequent clicks on URLs or submit buttons will run next debug session. To avoid this behaviour you can uncheck Tools->Settings->Debugger->Debug session.
NOTE: if submit or navigation is done to a different domain name or with different protocol used (HTTPS vs HTTP) debug session won't run

II. Debugger Toolbar
You navigate to a page using Internet Explorer browser and click Debug button on the toolbar:

After debug session is finished and you get your page rendered in the browser all subsequent clicks on URLs or submit buttons will run next debug session. To avoid this behaviour you can uncheck Debug->Session in the toolbar:


III. Other ways
Alternatively there are some other ways to run debug session for a script that is executed from POST or GET request or if in other words the first page is a plain HTML (without PHP):

1. you can add debug session request to the form where you run POST or GET.
For example (POST):
<form ....>
<input type=hidden name=DBGSESSID value="1;d=1">
...
</form>
(GET):
http://myhost/myscript?DBGSESSID=1;d%3D1
(d%3D1 means d=1 but urlencode'd)

Note: in case of dbg prior to version 2.16, the lines above should be corrected to
<input type=hidden name=DBGSESSID value="1@clienthost:7869">
and
http://myhost/myscript?DBGSESSID=1@clienthost:7869
respectively


2. header("Location: http://mywebhost/myscript.php?DBGSESSID=1;d%3D1");

Note: in case of dbg prior to version 2.16, line above should be corrected to
header("Location: http://mywebhost/myscript.php?DBGSESSID=1@clienthost:7869")


3. add DebugBreak() function call in appropriate location in the script.

4. use scriplets http://forum.nusphere.com/tip-scriptlets-for-starting-stopping-debugger-session-t1231.html

See this topic for DBGSESSID syntax
View user's profileFind all posts by dmitriSend private messageVisit poster's website
HOWTO: Run debug session ?
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