Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Breakpoints in "action" scripts
Breakpoints in "action" scripts [message #21557] Thu, 17 May 2007 21:05 Go to next message
Eclipse UserFriend
Originally posted by: dserodio.gmail.com

Thanks to the excellent documentation at
http://www.thierryb.net/pdtwiki/index.php?title=PDT_User_Gui de I managed
to create a breakpoint on my "index.php" page, and the execution
actually stopped at this breakpoint.

Now, I need to set a breakpoint on a page which processes the form
submission, ie the 'process.php' in '<form action="process.php">'.

How can I make the execution stop at this breakpoint?

Thanks,
Daniel Serodio
Re: Breakpoints in "action" scripts [message #21644 is a reply to message #21557] Fri, 18 May 2007 00:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Darnell.Turner.gmx.net

> Now, I need to set a breakpoint on a page which processes the form
> submission, ie the 'process.php' in '<form action="process.php">'.
>
> How can I make the execution stop at this breakpoint?

It should stop there if you set the breakpoint in some php block inside
the process.php file. If it’s mixed html and php and you try to set a
breakpoint into a line where no php is found, the breakpoint is set to
the next available php line. Does that help you?

dT
Re: Breakpoints in "action" scripts [message #21958 is a reply to message #21644] Fri, 18 May 2007 13:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dserodio.gmail.com

Darnell Turner wrote:
>
>> Now, I need to set a breakpoint on a page which processes the form
>> submission, ie the 'process.php' in '<form action="process.php">'.
>>
>> How can I make the execution stop at this breakpoint?
>
> It should stop there if you set the breakpoint in some php block inside
> the process.php file. If it’s mixed html and php and you try to set a
> breakpoint into a line where no php is found, the breakpoint is set to
> the next available php line. Does that help you?

The problem is that I need to set a breakpoint in process.php, and start
the request in index.php.

If I choose "Debug As > PHP Web Page" in process.php, it opens
process.php in the Web Browser.
If I choose "Debug As > PHP Web Page" in index.php, it opens index.php
in the browser and then the debugger session ends.

I need it to open index.php in the browser, so I can fill the form and
then submit to process.php, where the breakpoint is.

Thanks,
Daniel Serodio
Re: Breakpoints in "action" scripts [message #22003 is a reply to message #21958] Fri, 18 May 2007 19:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Darnell.Turner.gmx.net

When I have started one debugging session for a file in a project, I can
point the same browser to any other url in the same project and the
process will stop at any breakpoint in processed code.

I would start checking if the session cookie is still present in the web
browser, and ah! yes: you should try to append several GET parameters
from the url that was originally opened by eclipse to the process.php
call. For example in my case:

index.php&
debug_port=10000&
start_debug=1&
debug_start_session=1&
debug_no_cache=1179515411882&
debug_host=10.211.55.2%2C10.37.129.2%2C192.168.1.12%2C127.0. 0.1&
debug_session_id=1001&
send_sess_end=1

That is the url that eclipse calls for me. So you should try to append
that to the process.php call.

- dT
Re: Breakpoints in "action" scripts [message #22047 is a reply to message #21958] Fri, 18 May 2007 19:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Darnell.Turner.gmx.net

I just checked it: I let eclipse debug index.php, it calls it in my
standard browser with all the get parameters. Then I take the same
browser window and type in results.php (without any get paramams). If I
have any breakpoints in results.php it stops there.

- dT
Re: Breakpoints in "action" scripts [message #22091 is a reply to message #22003] Fri, 18 May 2007 20:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dserodio.gmail.com

Thanks for taking your time to help me.

Darnell Turner wrote:
>
> When I have started one debugging session for a file in a project, I can
> point the same browser to any other url in the same project and the
> process will stop at any breakpoint in processed code.

If I set the a breakpoint on index.php, and "Debug As > PHP Web Page"
index.php, it stops at this breakpoint. Then, if I hit Resume, the
index.php executes completely, and then the debug session is over.

It seems that the debugging session lasts a single HTTP request. As soon
as the request is finished, the "Debug" view shows "<terminated>".

> I would start checking if the session cookie is still present in the web
> browser, and ah! yes: you should try to append several GET parameters
> from the url that was originally opened by eclipse to the process.php
> call. For example in my case:
>
> index.php&
> debug_port=10000&
> start_debug=1&
> debug_start_session=1&
> debug_no_cache=1179515411882&
> debug_host=10.211.55.2%2C10.37.129.2%2C192.168.1.12%2C127.0. 0.1&
> debug_session_id=1001&
> send_sess_end=1
>
> That is the url that eclipse calls for me. So you should try to append
> that to the process.php call.
>
> - dT
Re: Breakpoints in "action" scripts [message #22178 is a reply to message #22091] Sat, 19 May 2007 02:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Darnell.Turner.gmx.net

Strange. Could it be that you have some odd cookie settings in your
browser? What’s your UA & OS?

– dT
Re: Breakpoints in "action" scripts [message #22625 is a reply to message #22178] Mon, 21 May 2007 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dserodio.gmail.com

Darnell Turner wrote:
> Strange. Could it be that you have some odd cookie settings in your
> browser? What’s your UA & OS?
>
> – dT

My "default" browser is Firefox, but AFAIK Eclipse uses IE on Windows.
I'm running Windows XP SP2 with IE 6.

Based on your previous comment about GET parameters, I checked what
parameters it's sending to my index.php, and found this:

original_url=http://localhost/pdttest/index.php&
debug_port=10013&
start_debug=1&
debug_start_session=1&
debug_no_cache=1179754084218&
debug_host=200.144.154.215%2C127.0.0.1&
debug_session_id=1032&
send_sess_end=1

But these parameters won't be sent to process.php, so if debugging
depends on them, how could process.php "know" that it must run in debug
mode?

Also, this "send_sess_end=1" seems suspicious, it sounds like it's
asking to end the debugging session.

Thanks in advance,
Daniel Serodio
Re: Breakpoints in "action" scripts [message #24520 is a reply to message #22625] Tue, 29 May 2007 18:45 Go to previous message
Eclipse UserFriend
Originally posted by: Darnell.Turner.gmx.net

> But these parameters won't be sent to process.php, so if debugging
> depends on them, how could process.php "know" that it must run in debug
> mode?

By the session cookie in your browser.

>
> Also, this "send_sess_end=1" seems suspicious, it sounds like it's
> asking to end the debugging session.

Well, does it? What if you just call it manually and omit that part?
Could it be that you have some security software running that kills
sessions or cookies?

-dT
Previous Topic:Slow project builder
Next Topic:Another xdebug gotchya (w/solution)
Goto Forum:
  


Current Time: Thu Dec 26 18:07:58 GMT 2024

Powered by FUDForum. Page generated in 0.03981 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top