Bug 458078 - XDebugger web launch doesn't stop automatically after finishing debug session
Summary: XDebugger web launch doesn't stop automatically after finishing debug session
Status: REOPENED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: PHP Debug CLA
QA Contact: Sylvia Tancheva CLA
URL:
Whiteboard:
Keywords:
: 458447 (view as bug list)
Depends on: 458435
Blocks:
  Show dependency tree
 
Reported: 2015-01-21 14:21 EST by Bartlomiej Laczkowski CLA
Modified: 2020-05-14 10:16 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bartlomiej Laczkowski CLA 2015-01-21 14:21:49 EST
Steps to reproduce:

1. Create PHP project with simple echo.php file
2. Deploy the file to a server with XDebug installed
3. Put the breakpoint anywhere in echo.php file
4. Start debugging the deployed script via Debug as -> PHP Web Application
5. Press 'Resume' after the debugger hits the breakpoint

Result: Debug session is done but 'Remote Launch' element in Debug view is still active (has running state). User has to terminate/stop the session manually.

Expected: 'Remote launch' element should be inactive (should have terminated state).
Comment 1 Bartlomiej Laczkowski CLA 2015-01-21 16:24:36 EST
Patch proposal: https://git.eclipse.org/r/40074
Comment 3 Thierry BLIND CLA 2015-01-26 09:41:41 EST
Hi,
actually I find the fact not terminating a debug session a very useful functionnality!
I can navigate between web pages, without ending my current debug session, and that's really *GREAT*!
I can easily test this way Ajax calls, POST datas between web pages, etc...

You're removing something very useful (in my point of view), so wouldn't it be possible to configurate automatic session termination using some project or global configuration?
Or simply reverse this patch for now, waiting for a better solution?
Or apply automatic session termination only for PHP Cli applications (but not for PHP Web Applications)?

Thierry.
Comment 4 Bartlomiej Laczkowski CLA 2015-01-26 10:33:17 EST
Hi Thierry,

Well... You are totally right. I missed the fact that XDebug session is running all the time in the background (although sending some info back from the server that the session has been stopped). Thanks for pointing that out. In this case it seems like this fix does not make sense at all, I will revert the changes.
Comment 5 Bartlomiej Laczkowski CLA 2015-01-26 10:37:36 EST
Maybe the option/preference for choosing the automatic termination would be useful in this case? As a default the option should be as it was before the fix.
Comment 6 Thierry BLIND CLA 2015-01-26 11:07:48 EST
@Bartlomiej : Yes, good idea, it would be a good compromise!
Would you have time to implement this feature? If not, a simple reverse would be a good first step ;)
Comment 7 Bartlomiej Laczkowski CLA 2015-01-26 11:13:27 EST
(In reply to Thierry BLIND from comment #6)
> @Bartlomiej : Yes, good idea, it would be a good compromise!
> Would you have time to implement this feature? If not, a simple reverse
> would be a good first step ;)

I will make the time :) Reported bug #458435
Comment 8 Michal Niewrzal CLA 2015-01-26 11:28:19 EST
If not terminated session is valuable behavior (like Thierry said) for XDebug web launch maybe it should stay as it was before this patch? What is use case for automatic session closing? Maybe this option from bug #458435 is not necessary? I'm just thinking loud;)
Comment 9 Bartlomiej Laczkowski CLA 2015-01-26 11:35:59 EST
(In reply to Michal Niewrzal from comment #8)
> If not terminated session is valuable behavior (like Thierry said) for
> XDebug web launch maybe it should stay as it was before this patch? What is
> use case for automatic session closing? Maybe this option from bug #458435
> is not necessary? I'm just thinking loud;)

It might be useful when you don't want to terminate the session manually every time when debugging with XDebug. Let's assume that someone is debugging simple one-script web page - in this case you don't have to go back to Debug view, select the launch and terminate it. What's more re-launch of debug session will give you error message that session is already running and at the end of the day you have to terminate it manually. I think that user should decide what is the best option...
Comment 10 Thierry BLIND CLA 2015-01-26 11:40:12 EST
@Michal, @Bartlomiej :
Making it an option is still a good idea, of course ;)
But I also think loudly:
finally, wouldn't it be less stressful to just revert this patch for now?
So Bartlomiej could work on a new option (about automatic termination) without having to worry about the 3.4 release schedule.

Thierry.
Comment 11 Bartlomiej Laczkowski CLA 2015-01-26 12:24:30 EST
@Thierry, @Michal: OK, change will be reverted.

I will think carefully about this option. It seems like this would be similar to 'Debug First Page Only' & 'Debug All Pages' that are in Zend Debugger options for web launches.
Comment 12 Jérémy T. CLA 2015-01-26 13:14:27 EST
Opened a bug before noticing the comments in this one:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=458447

I can confirm this is not exactly a desired behavior.

Looking forward to the revert fix. 

I also agree that a general option (and possibly per-debug-config one as well) would be viable here.
Comment 13 Michal Niewrzal CLA 2015-01-26 15:34:15 EST
*** Bug 458447 has been marked as a duplicate of this bug. ***
Comment 14 Michal Niewrzal CLA 2015-01-26 15:51:50 EST
Patch is reverted. Tomorrow nightly PDT version with this change will be available for download.

We will back to this topic when Bartlomiej will create patch for bug #458435.

Thanks for feedback :)