I cant get remote debugging to work

122 views
Skip to first unread message

Andrew Katz

unread,
Apr 15, 2007, 12:27:16 PM4/15/07
to tsWebEditor
I meticulously followed all of the instructions.

I downloaded and verified that Xdebug is in PHP.

I changed php.ini.

I created that test script and placed in my browser:
http://localhost/xdebug-test.php?XDEBUG_SESSION_START=tswebeditor

And the script put the number 2 on my browser, but it did not start
the tswebeditor and place the source into debug there.

I read about the cookie and found it. Content is tswebeditor.

Is there anything I need to set up in the program to get this to
happen.

By the way, I tried to debug this script and got an error:
Fatal error: Call to undefined function xdebug_break() in C:...xampp
\htdocs\xdebug-test.php on line 7

Shaba1

unread,
Apr 16, 2007, 11:33:21 AM4/16/07
to tsWebEditor
I am just a beginner with this program myself so do not take what I
say as the final answer. putting the xdebug_start_session parameter on
the url will not start tswebeditor Or any other xdebug client. All
that does it set the session cookie to the value after the equal sign
and pass that cookie to the debug client. In this case tswebeditor IS
your debug client. So you already have to have it running with the
script you want to debug open.

The undefined fuction error sounds like the xdebug extension is loaded
into php. Check your php.ini file for that server to be sure that it
is. If the file is hosted on a webserver machine that you do not
control i.e. a outside webhosting service that you either pay for or
get for free, they may not have added the xdebgug extension when they
set up your account. If It is hosted by you then you need to download
and intall xdebug from

http://www.xdebug.org

Andrew Katz

unread,
Apr 16, 2007, 1:38:42 PM4/16/07
to tsWebEditor
I appreciate your reply. But I already know that I have Xdebug
installed. And I am using my local server which I downloaded from
xampp. I just do not understand how to make the tswebeditor know that
it is debugging the same PHP program which I have called up in my
browser (from localhost). I need specific instructions on how to use
tswebeditor for this purpose. I had the editor open with that script.
But maybe I did that wrong.

Is there anyone official from tsWebEditor to assist me?

Andy

Shaba1

unread,
Apr 17, 2007, 1:19:07 PM4/17/07
to tsWebEditor
here is another new user suggestion. Go to the debug menu click
parameters. Ensure that "Run Local" is checked and that the session
name is set to "tswebeditor"

> > > \htdocs\xdebug-test.php on line 7- Hide quoted text -
>
> - Show quoted text -

Andrew Katz

unread,
Apr 17, 2007, 9:18:36 PM4/17/07
to tsWebEditor
These are what it has always been set to. And I now find it works.
However, I am sure that there is a sequence of doing things which I
did not do the last time, and did this time, which made the
difference. I just hope I can reproduce it. This is what I did. I
started tswebeditor, placed the php test in it using the file system
copy which also corresponds to localhost. Then I started my server
(apache). Then I tried to run the script locally and got an error that
it did not know xdebug_break. Then I went to my browser and ran the
program using that string with the session start.

Thanks for your help. Now I think that maybe I could do just the
correct things to make the competitor php editor product debug for me.
Have you ever heard of HateML? It uses the other debugger (DBG?), not
Xdebug. And I got frustrated so I came back trying tswebeditor. These
editors have so much in common that I wonder if one copied parts of
the other.

Andy

Shaba1

unread,
Apr 19, 2007, 10:18:33 AM4/19/07
to tsWebEditor
Well I am glad you got it work with the example. But I still have
questions about the debugger that I need answered. It seems that
sometimes it works and sometimes it does not. Most times it does not
work how I want it to work, which is to let me go step by step thru a
program and display certain variables. I have set watches for those
variables but sometimes pressing the green run button makes the
debugger jump all the way to the end of my program. Most times not
step into,step over or step out buttons are availible. They are just
greyed out.

> > > - Show quoted text -- Hide quoted text -

sup...@tswebeditor.tk

unread,
Apr 20, 2007, 6:20:00 AM4/20/07
to tsweb...@googlegroups.com
Hi,

First:

Create a script with phpinfo, that will print your settings of php.ini.
Call it from your *webbrowser*.

<?php phpinfo() ?>

It must contain a xdebug section or the extension is not loaded.
Also check the xdebug config, it should look like this:

xdebug.remote_enable=On
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_mode=req
xdebug.remote_port=9000

if your webserver is not on the same pc as tswebeditor, change
xdebug.remote_host where tswebeditor is running. the same port as
xdebug.remote_port has to be in the field Editor Settings/Tab Debugger,
Field Port.

Second:

Create a test script with tsWebEditor. Save it (do not close it in
tsWebEditor) and call it from your webbrowser e.g.
http://localhost/xdebug-test.php?XDEBUG_SESSION_START=tswebeditor
The value for XDEBUG_SESSION_START does not matter.
Then tsWebEditor should come in the foreground and should stop at
xdebug_break().

If not, something went wrong.
Please note that a firewall (like the Windows XP Firewall) might causes
problems. Also the function that tsWebEditor will come in the foreground
might not work due security updates from ms to prevent viruses. When
tsWebEditor is in debug modus, the window title will change. so if your
browser is loading for some time and does not show the value of $i,
change to tsWebEditor, if the browser show in a moment the value,
something went wrong.


<?php

$i = 1;

$i++;

xdebug_break();

print $i;

?>


> I just do not understand how to make the tswebeditor know that
> it is debugging the same PHP program which I have called up in my
> browser (from localhost). I need specific instructions on how to use
> tswebeditor for this purpose. I had the editor open with that script.

xdebug tells tsWebEditor which script xdebug is debugging.

> here is another new user suggestion. Go to the debug menu click
> parameters. Ensure that "Run Local" is checked and that the session
> name is set to "tswebeditor"

that settings are just for that if you start a debug session from
tsWebEditor (green triangle) and not from your webbrowser (except the
Catch Output and Log Data settings works always).

i hope that helps. if not write again.

...thaler...

Andrew Katz

unread,
Apr 21, 2007, 8:02:51 AM4/21/07
to tsWebEditor
This works. Thank you.

On Apr 20, 6:20 am, "supp...@tswebeditor.tk" <supp...@tswebeditor.tk>
wrote:


> Hi,
>
> First:
>
> Create a script with phpinfo, that will print your settings of php.ini.
> Call it from your *webbrowser*.
>
> <?php phpinfo() ?>
>
> It must contain a xdebug section or the extension is not loaded.
> Also check the xdebug config, it should look like this:
>
> xdebug.remote_enable=On
> xdebug.remote_handler=dbgp
> xdebug.remote_host=localhost
> xdebug.remote_mode=req
> xdebug.remote_port=9000
>
> if your webserver is not on the same pc as tswebeditor, change
> xdebug.remote_host where tswebeditor is running. the same port as
> xdebug.remote_port has to be in the field Editor Settings/Tab Debugger,
> Field Port.
>
> Second:
>
> Create a test script with tsWebEditor. Save it (do not close it in

> tsWebEditor) and call it from your webbrowser e.g.http://localhost/xdebug-test.php?XDEBUG_SESSION_START=tswebeditor

Reply all
Reply to author
Forward
0 new messages