Eclipse, XAMPP, xDebug - waiting for XDebug session - stays in 57%
Asked Answered
F

6

1

When I start debugging the process stays there at 57% and says "waiting for XDebug session".

This is a duplicate post on StackOverFlow, but I tried all the answers, nothing worked.

It was working fine until before two days. I don't know what went wrong.

Fourinhand answered 20/4, 2013 at 14:53 Comment(0)
S
5

Having used Eclipse to launch xdebug sessions in Firefox for ever now, all of a sudden 23/4/2013 it would not launch xdebug using Firefox. It gave me the launch 57% and hang problem.

It was quite happy to launch xdebug sessions in IE/Chrome/Safari/Opera but not Firefox.

The only thing I changed around this time was I upgrades my java runtime to 1.7.0_21 from a previous version ( cannot remember which but I did jump more than one release so it was probably 1.7.0_19 )

I took a look at the project log file, Check your projects workspace folder for a subfolder called .metadata where there should be a .log file, there is one of these for each project so be sure you are looking at the correct one.

This is what was in mine:

!SESSION 2013-04-23 11:06:21.238 ----------------------------------------------- eclipse.buildId=M20130204-1200 java.version=1.7.0_21 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB Command-line arguments: -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.ui.browser 4 0 2013-04-23 11:07:32.584 !MESSAGE Launching C:\Program Files\Mozilla Firefox\firefox.exe has failed. !STACK 0 java.io.IOException: Cannot run program "C:\Program": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at org.eclipse.ui.internal.browser.browsers.MozillaBrowser$BrowserThread.openBrowser(MozillaBrowser.java:94) at org.eclipse.ui.internal.browser.browsers.MozillaBrowser$BrowserThread.run(MozillaBrowser.java:165) Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 6 more

Because I saw this line java.io.IOException: Cannot run program "C:\Program": CreateProcess error=2,

It made me thinks that for some reason java could no longer cope with folder names with spaces in them (very strange), so I changed the eclipse preferences and used the 8.3 naming convension C:\PROGRA~1\MOZILL~1\firefox.exe

Now it launches the xdebug session again!!

This is very strange as it does not seem to have problems with

C:\Program Files\Opera\opera.exe OR
C:\Program Files\Safari\Safari.exe OR
C:\Program Files\Internet Explorer\iexplore.exe

So all I can think of is that it does not like 2 folder names with spaces in them for some obsqure reason, because it wont launch firefox from C:\Program Files\Mozilla Firefox\firefox.exe I assume it launches IE from a similiar folder named address as it is the default browser on this system.

Anyhow, the solution for me was to change the eclipse preferences ->General -> Web Browser -> Firefox to use the 8.3 DOS directory naming convension.

Hope this helps

Shipman answered 23/4, 2013 at 10:52 Comment(6)
Thank you for the detailed explanation. Mine was the same scenario. It happened only after few Java updates. May be we should post in Java forums?Fourinhand
Glad it helped. I hope you didnt spend as long as me banging my head on the keyboard.Shipman
In my case I have the same problem, but I try to use 8.3 DOS convention, I am getting an error message from clipse: The location value is not a valid path name. Any ideas ?Hedges
@Hedges What did you put in the `window->preferences->General->Web Browser->Firefox->Edit External Web Browser->Location field? And are you 32 bit or 64 bit windows>Shipman
I am 64 bit win, and I put the following: C:\PROGRA~2\MOZILL~1\firefox.exe . It opens Firefox perfectly from the Win Explorer. I am using Firefox 23.0.Hedges
Probably, this is the reason. I'll try Firefox 3.6.28.Hedges
B
1

riggsfolly's analysis and solution are both correct, however for some reason my eclipse would not allow me to use the DOS 8.3 naming convention. As an alternative for those who run into the same issue you can try the following:

  1. Create a parallel folder structure but do it without spaces (eg. "C:\ProgramFiles86\MozillaFirefox\")
  2. Download and install firefox, using the custom installation options to install to your new 'spaceless' directory
  3. In eclipse preferences ->General -> Web Browser: Make a new entry (eg. "Firefox2") and point it at your new installation (eg. C:\ProgramFiles86\MozillaFirefox\firefox.exe").
  4. Finishing touch - use Mozilla Sync between the two browsers so you don't have to worry about outfitting your new Firefox.
Brachy answered 1/5, 2013 at 14:51 Comment(1)
@RiggsFolly's solution worked for me. I have used it many times now as my Eclipse crashes about 3 times till now.Fourinhand
F
1

And the easiest way I used to find out the 8.3 compatible windows path of Mozilla Firefox is as below.


C:\>dir .* /x
 Volume in drive C has no label.
 Volume Serial Number is XXXX-XXXX

 Directory of C:\

File Not Found

C:\>dir *.* /x
 Volume in drive C has no label.
 Volume Serial Number is XXXX-XXXX

 Directory of C:\

07/14/2009  08:50 AM    <DIR>                       PerfLogs
04/01/2013  07:32 PM    <DIR>          PROGRA~1     Program Files
05/14/2013  01:50 PM    <DIR>          PROGRA~2     Program Files (x86)
01/17/2013  01:43 PM    <DIR>                       Users
05/12/2013  05:46 AM    <DIR>                       Windows

C:\>cd PROGRA~2

C:\PROGRA~2>dir *.* /x
 Volume in drive C has no label.
 Volume Serial Number is XXXX-XXXX

 Directory of C:\PROGRA~2

05/14/2013  01:50 PM    <DIR>                       .
05/14/2013  01:50 PM    <DIR>                       ..
05/14/2013  01:50 PM    <DIR>          COMMON~1     Common Files
03/05/2013  10:50 AM    <DIR>                       Google
07/14/2009  11:07 AM    <DIR>          INTERN~1     Internet Explorer
04/19/2013  06:03 PM    <DIR>                       Java
04/14/2013  10:16 PM    <DIR>          MOZILL~1     Mozilla Firefox
04/15/2013  10:57 AM    <DIR>          MOZILL~2     Mozilla Maintenance Service

C:\PROGRA~2>cd MOZILL~1

C:\PROGRA~2\MOZILL~1>

Fourinhand answered 15/5, 2013 at 7:2 Comment(0)
F
1

I had a similar problem. mine stayed at 72%. I solved my issue by setting

xdebug.mode = debug

in the php.ini file. I restarted the apache server now it works fine.

Frailty answered 30/4, 2021 at 11:44 Comment(1)
Man, I wasted like 6 hours today and all kinds of configurations - this is what helped me. This must be something new, because all of the tutorials are missing this and I setup this successfully in the past without any problems. Without "xdebug.mode = debug" Eclipse treated the "Debug" command like a "Run" (run the page without even trying to open the debug perspective) and the "Waiting for the debugger sesion" was stuck on 45%.Chivalric
U
0

In addition to RiggsFolly's life-saving solution, maybe the following is useful for anyone.

Issue 1: different path on 32 bits and 64 bits Windows 7

On 32 bits Windows 7, the path is: C:\PROGRA~1\MOZILL~1\firefox.exe

On 64 bits Windows 7, the path is: C:\PROGRA~2\MOZILL~1\firefox.exe

(Note the different figure behind PROGRA~ , as I figured out by Abu Sithik's post)

Issue 2: Where to set the path?

You should do the setting (as RiggsFolly had already correctly said) in: Window > Preferences > General > Web Browser > Firefox > Edit The correct place to set the path to the firefox executable: in Window - preferences

and NOT (as I did intuitively) in Run > Debug Configurations > Web browser > Firefox - Internal Server. At least, as far as I tried out (but I'm a relative Eclipse novice) it seems this setting doesn't influence the path that Eclipse/xdebug/java uses to start the browser in an xdebug session. enter image description here

I hope this helps anyone prevent wasting time as I did fiddling around in vain, when switching between computers running resp. 32 bits and 64 bits Windows, and having to change the path to the firefox executable, until at a certain moment by luck I got the correct ways as indicated above...

Unijugate answered 12/6, 2013 at 15:15 Comment(0)
B
0

I have the same problem, but suddently works when I select de 'Default system web browser instead of Firefox directly. My default web browser is Firefox and now it starts oks.

I hope this helps.

Biophysics answered 22/6, 2013 at 14:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.