How to prevent debug opening the browser? [message #85192] |
Mon, 01 December 2008 07:48  |
Eclipse User |
|
|
|
PDT behavior is currently extremely annoying with xdebug - i hope i am
missing something. Some setting or something.
Expected:
* (start listening for xdebug events - should happen automatically - ie.
always listening. can see some difficulties implementing that - so,
probably not possible currently)
* whenever / whatever i want to debug i tell that to my browser and the
debugger kicks in.
Actually what i get:
* launch debugger
* browser window opens with the mandatory (WHY!?) and meaningless source
file set in settings (i usually use a special file that does nothing to
prevent possibly harmful effects caused by debugger going amok)
* hit F8 to get out of it.
* close the useless browser window that got spawned
* :) here comes the expected part where i can actually use the debuger
sensibly and as needed. (when i want to debug - i tell that to browser and
the next server-event triggers the debugger)
* close debugger
* close another browser spawn.
I would VERY MUCH like to get rid of all the other bullet-points besides
the one with the smiley. Can that be done with 2.* version of PDT?
Managed to get rid of all the other (at least for me) useless spawns that
opened in eclipse itself - just can't get rid of the browser spawn and
first debug run.
|
|
|
|
|
Re: How to prevent debug opening the browser? [message #86900 is a reply to message #86778] |
Tue, 16 December 2008 03:46   |
Eclipse User |
|
|
|
Originally posted by: dkel50.hotnospmail.com
Shawn is correct what he states here. If you use PDT to launch a debug
session that launch is designed to do several things. One is to ensure
that xdebug will activate on the server and the other is to associate
the executed script on the server with that of the script you have
specified in the launch in order to do automated path mapping. In order
for all that to work, PDT invokes the URL you specify in that launch to
ensure the appopriate script is executed and to ensure xdebug activates
by specifying the cookie. This is working as designed (and this was all
designed before the FF extension was available).
It sounds to me like you want to enter the URL yourself in Firefox and
control whether the cookie is on or not via the firefox extension, and
in that case you want to use the remote session initiation/JIT support
in PDT 2.0.0. You can turn this in the PHP Debugger preferences. Now if
you use the FF extension and enable the cookie yourself, then enter the
URL, PDT should receive the xdebug initial handshake and allow you to
debug it.
Alternatively you can change PDT to use the internal browser (Under
preferences, general section) and then the launch will always put the
web page into a single eclipse view (so you won't get multiple FF tabs).
As for the reason KEY is appended to the URL. This was due to Internet
Explorer (which the internal web browser view uses on windows) caching
web pages if the URL was identical. Ie you could change your php code
but the web browser would show the cached page and not execute your
changed code. Putting a KEY value which changes on each launch forces IE
to execute the php code.
Dave Kelsey
Hell No wrote:
>> As to why PDT is working the way it is for the non-JIT debug setup...
>> Xdebug looks for a cookie within the current page request to see if it
>> should send debug information to the remote host. The only way for
>> that cookie to exist is for PDT to open up a browser with the cookie
>> information put into the URL so that Xdebug can set the cookie. Check
>> out: http://www.xdebug.org/docs/remote and look at the section on HTTP
>> Debug Sessions. PDT is doing its bests to handle what Xdebug requires
>> to get a debug session started.
>
> That, as far as i can see, is incorrect. I use FF extension XDebug
> helper for that. ie i tell trough FF when and where i want to debug -
> and it works just fine. It's just the hassle with the
> bound-to-be-useless initial debug session spawn (that i exit / ignore /
> close anyway) that i would like to be without.
>
> Do not know eclipse inner logic related to that, so can't really know
> how or whether this can be done. Logically, there should be no problems
> (ie current project + current debug config [just the config] + xdebug
> connection spawned by whatever means [FF extension in this case] should
> be enough).
>
> One thing i am wondering: eclipse spawn has &KEY=<some number that looks
> like time> attached. Does not show up in xdebug communication (visibly)
> nor in xdebug documentation. What is it?
>
|
|
|
|
Re: How to prevent debug opening the browser? [message #665122 is a reply to message #86900] |
Wed, 13 April 2011 07:22  |
Eclipse User |
|
|
|
Eclipse User wrote on Tue, 16 December 2008 03:46 | Originally posted by: dkel50.hotnospmail.com
Alternatively you can change PDT to use the internal browser (Under
preferences, general section) and then the launch will always put the
web page into a single eclipse view (so you won't get multiple FF tabs).
|
How? where do I set that please?
under
Prefences -> General -> Web Browser
the "Use internal web browser" is greyed out
[Updated on: Wed, 13 April 2011 07:24] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.08676 seconds