How to stop creating new debug session on every Ajax request |
Site Admin
|
If your client calls your server too frequently, why don't you try to relax it?
You can analyze DBGSESSID cookie and if it is set, just make longer timer periods before each ajax call. IDE can't fix this for you. IDE can't stop responding to the debugger requests that your client initiates, otherwise you'll first ask us why the breakpoints do not work. Alternatively, if you know that some (or all) your ajax requests should not trigger debugger, just add DBGSESSID=-1 into URL they call as a GET parameter |
||||||||||||
_________________ The PHP IDE team |
|
Hi Dmitri,
Thank you, I think you answered my question. I understand that the debugger needs to respond to requests in order for breakpoints to work. My question was, did it need to create a new debug session on every incoming request? I'll try your suggestion about adding DBGSESSID=-1 into the URL for requests that should not trigger the debugger (most of them) - that may be the solution I was looking for. Regards, Gordon |
||||||||||||
|
|
Hello again,
After trying your suggestion to set "DBGSESSID=-1" in requests where I do not want to trigger a new debug session, I am finding it works *too* well. Once any request has been made with that parameter set, then *all* breakpoints stop working, even those relating to a request that does NOT have it set. So I'll need to seek another solution. I wonder if I can use DebugBreak() as an alternative to breakpoints in the code? I've seen various references to it, but no actual documentation of how it works. Can you help? Thank you. |
||||||||||||
|
Site Admin
|
try "DBGSESSID=1;s=0"
|
||||||||||||
_________________ The PHP IDE team |
|
Thank you, Dmitri, this is definite progress. However, I am finding that, once it stops at _any_ breakpoint, it re-activates debug sessions for *all* requests, including those where "DBGSESSID=1;s=0" is set. In other words:
(1) Launch the app from PHPEd; "DBGSESSID=1;s=0" is set for selected requests where I do not want it to start debug sessions. Working as hoped! (2) Set a breakpoint for a request where I DO want to debug; again, works as hoped, the breakpoint works. However: (3) After stopping at a breakpoint in (2), it starts creating new debug sessions again from requests where DBGSESSID=1;s=0" is set |
||||||||||||
|
Site Admin
|
sorry for typo, I meant "DBGSESSID=-1;s=0"
It shouldn't reset cookie |
||||||||||||
_________________ The PHP IDE team |
|
Unfortunately, that stops all breakpoints from working, even when "DBGSESSID=-1;s=0" is not part of the request. Any other suggestions? Otherwise, I think I should try DebugBreak instead.
|
||||||||||||
|
Site Admin
|
What we need is a request that won't trigger debug session (it's what -1 is for) but it should not cancel all further sessions (it's what c=0 is for). I'm sorry for the 2nd typo.
Can you try DBGSESSID=-1;c=0 ? FYI DBGSESSID syntax is described here http://www.nusphere.com/kb/technicalfaq/faq_dbg_related.htm |
||||||||||||
_________________ The PHP IDE team |
|
gskramer, you may want to give a try to Fiddler (i hope that i don't break any rules by posting this). You can easily make it remove particular cookie(s) for say requests that start with or contain particular string ... it has very comprehensive scripting capabilities which allows you to modify every single request, adding/removing headers modifying get/post parameters, acting like a reverse proxy and much more. I just can't imagine developing API's without it. I've been using it for years. And ... its free.
|
||||||||||||
|
|
Thanks for the suggestion, kraz. I used Fiddler on a different project a number of years ago and had forgotten all about it - I'll need to get familiar with it again!
|
||||||||||||
|
How to stop creating new debug session on every Ajax request |
|
||
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