NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PhpEd Debugger & Profiler Bookmarklets


Joined: 03 Apr 2004
Posts: 78
Reply with quote
Hey I've created bookmarklets for the debugger and profiler that work well.

Here is the layout I have setup in my firefox:



You can download the bookmarklets here: (right click/save as): http://evolv3.funklabs.org/downloads/phped_bookmarklets.html

Or, you can visit the above link, and right click each link you are interested in and add to your own bookmarks. The bookmarklets are setup to work with localhost and port 7869, so adjust to your tastes/needs.

I created these to use the javascript location object (and have different bookmarklets used for appending or inserting -- inserting with ? at end of query that already has a ? will not pass the proper query obviously so I had to do some work for that).

I hadn't seen these around yet, so I did the footwork. It works and PhpEd debugger freaking rocks the house debugging this way. For the longest time I didn't know that I could do this (yes I read instructions but always debugged right in IDE -- until I had to build a form and input validation Razz)

For that I used:

var_export($_POST);
Then in my source I would include the output of that at the top where i needed it thus:
$_POST = <pasted output from var_export>;
It was handy way to atleast test form posts (but only because I didn't realize I could do it in realtime external browser sessions).

Enjoy!
View user's profileFind all posts by Rick ChristySend private messageYahoo Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8351
Reply with quote
I think this idea is very close to tip-scriptlets-for-starting-stopping-debugger-session-t1231.html
Anyway, thanks Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Apr 2004
Posts: 78
Reply with quote
ddmitrie wrote:
I think this idea is very close to tip-scriptlets-for-starting-stopping-debugger-session-t1231.html
Anyway, thanks Smile


Damn. I thought I saw them, but couldn't remember where. When I looked for "bookmarklets", nothing showed up. Of course Sad Anyway both work. One question.. The cookie method, that would allow me to "flag the debugger" on, with cookie, while on a form page, without having to reload the form/document? and only activate dbg when I submit?

If so that rules. Going to try it, and if it works add that to my toolkit. Thanks!
View user's profileFind all posts by Rick ChristySend private messageYahoo Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8351
Reply with quote
Quote:
One question.. The cookie method, that would allow me to "flag the debugger" on, with cookie, while on a form page, without having to reload the form/document?

it's easier to try Smile
BTW, if you add s=N (where N=1..100) it will postpone debug session with N requests.
So if N=2 debug session will start with the 2nd request.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Apr 2004
Posts: 78
Reply with quote
ddmitrie wrote:
Quote:
One question.. The cookie method, that would allow me to "flag the debugger" on, with cookie, while on a form page, without having to reload the form/document?

it's easier to try Smile
BTW, if you add s=N (where N=1..100) it will postpone debug session with N requests.
So if N=2 debug session will start with the 2nd request.


That rules so much. That means that setting s=2 would do exactly what i want -- draw the form without the debug then when i post, debug starts. Awesome!

Thanks so much for such an outstanding debugger!

You really should add something like this to a "tips" section or something.

This works so great and was exactly what I was asking for:
Code:

javascript:location.href=location.protocol+'//'+location.hostname+location.pathname+'?DBGSESSID=1@localhost:7869;d=1,s=2'


What that does is turns on the debugger, like you said on the 2nd request, which is perfect for form debugging! One of the hardest parts of debugging for me was the annoying process of: focus phped debug window | step-out | return to browser | post, now i simply turn on with that bookmarklet when form is loaded (with debugger off) and voila, no more headaches.

*RAH!*
View user's profileFind all posts by Rick ChristySend private messageYahoo Messenger


Joined: 22 Sep 2005
Posts: 4
Reply with quote
These will copy over the query string so you don't lose that.

DEBUG OFF: javascript:location.href=location.protocol+'//'+location.hostname+location.pathname+(location.search ? location.search +'&' : '?')+'DBGSESSID=-1'
DEBUG ON: javascript:location.href=location.protocol+'//'+location.hostname+location.pathname+(location.search ? location.search +'&' : '?')+'DBGSESSID=1@clienthost:10001;d=1,p=0'
View user's profileFind all posts by rbarrecaSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8351
Reply with quote
with version 4.5 you don't need it anymore Smile
This version comes with Internet Explorer Toolbar therefore debug and profiler sessions can be run from it.
Very efficiently.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
PhpEd Debugger & Profiler Bookmarklets
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