Unexpected termination of script. Debugging ended.

This rather comprehensive error message comes from eclipse when a breakpoint is hit while debugging with XDebug web script on a remote server.

It is not that bad as it seems – all I needed to do is remove (watch) Expressions from the list. I don’t really care about the reason this happens – good thing is that it just helps.

This entry was posted in Software Development and tagged , , . Bookmark the permalink.

29 Responses to Unexpected termination of script. Debugging ended.

  1. Ben says:

    Thanks for this – I’ve been getting the same problem on and off for a while – it’s good to know how to fix it. However, it’s a bit annoying cause then you have to re-enter your watch expressions to continue debugging. I guess its a debuggerbug 🙂

  2. FP says:

    This error messages appears in my case whenever I click on the variables window. If the variables window is visible when I start the debugging, the error message appears right away. When I have the Expressions window selected, everything is fine until I want to see the variables.

  3. rich says:

    Hey FP, did you by any chance resolve your issue?

  4. winson says:

    hi, I have the same issue, but I have not to add any debug expressions, so I don’t know what can I to for this, have you any ideas? thanks!

  5. G.D. says:

    Hello,
    I had the same issue as FP. Can’t seem to figure out what is going wrong.

  6. chris says:

    anybody resolved this issue? I’m having the same problem with XAMPP 1.7.3 and
    php_xdebug-2.2dev-5.3-vc6.dll running PHP Eclipse under Windows 7

  7. Matt says:

    Same problem as FP here. The debugger performs flawlessly until I open the Variables window, then it crashes with the cryptic “unexpected termination of script, debugging ended” message. I haven’t had any luck yet in figuring out what’s going on.

  8. Louis says:

    Same as you guys. Once i open the variable window i get the unexpected error. Anybody tried the Zend debugger ?

  9. Sebastian says:

    Still have the same problems as all of you. So i tried Zend debugger, it works fine!
    Some solving ideas?

  10. Pingback: Eclipse mit XDebug unter Windows 7: Unexpected Termination of Script, Debugging Ended - folgende Lösungsvorschläge, Eclipse, Firewall, Verbindungen, Windows, Entfernen - André Kolell

  11. Anas Mughal says:

    I am also getting this problem only when I add a watch expression… Please let me know if anyone has resolved this issue. Thanks.

  12. zKon says:

    Hi, I had the same problem with the variables view being opened causing the debugger to fail with the cryptic message. I fixed it in a very strange way:
    1) I changed the xdebug module from the default that came with xampp (1.7.4) with php_xdebug-2.1.0-5.3-vc6.dll.
    2) I also made sure that the path for xdebug in php.ini was relative instead of absolute: zend_extension = \xampp\php\ext\php_xdebug-2.1.0-5.3-vc6.dll;

    These two things took me from frustrated axe murderer to prancing unicorn. I’m to scared to mess about with it to determine if it was just the module change or the php.ini change. Hope this helps someone.

  13. jackyx says:

    I have the same error as FP, please tell me if anyone solve this. I will try to use the Zend Debug. I use the XAMPP 1.7.3 and default
    php_xdebug.dll running PHP Eclipse under Windows 7

  14. Kevin says:

    Had the same problem as FP, but the fixes above did not work.
    Running Windows 7
    Eclipse
    Version: Helios Release
    Build id: 20100617-1415
    Eclipse IDE for PHP Developers Version 1.3.0.20100617-0520
    eclipse.buildId=I20100608-0911
    XAMPP 1.7.4
    php.ini entry – zend_extension = “\xampp\php\ext\php_xdebug-2.1.2-5.3-vc6.dll”
    Java Version 1.6.0_26 from Sun Microsystems Inc.

    The solution that worked for me was to uncheck “Show super globals in variable view” found in:
    Window->Preferences->PHP->Debug->Installed Debuggers->XDebug

    Hope this helps someone.

  15. peter says:

    Thanks Kevin,

    that solved the problem here as well. (same environment, same os)

  16. Ge says:

    Hi I had the same problem and can confirm that Kevin’s solution helped.

  17. odys says:

    Hey Kevin… THANKS!!! worked.
    Win7 x32, WAMP, WordPress on Eclipse

  18. Ryan Snook says:

    Thanks Kevin, that worked for me as well.. The odd thing, super globals still appear in the variables window…..

  19. Vlad says:

    What did it for me was to remove the server path mappings in Window > Preferences > Php > Php servers > Default Php Server > Edit > “Path Mapping” tab => remove all entries and it should work.

    Thanks for the blog!

  20. max4ever says:

    thanks a lot, this was driving me mad

  21. Thomas says:

    Wow thx – that really helped me ; )

  22. Everest says:

    Wow , thanks, Vlad solution works! Kevin’s not…

  23. BASTA! says:

    None of these solutions worked for me… Time to downgrade to PHP 5.3/Xdebug 2.1 ?

  24. Q. WANG says:

    Thanks for Kevin’s solution!!

  25. First of all thanks to figure out this annoing problem. You don’t need to clear your expressions list, just need to make it invisible or inacitve.(close or hide expressions view by keeping some other view on top).

  26. Christoph says:

    Same problem here, until today: use Xdebug 2.2.0 (Release date: 2012-05-08)
    Seems to work fine, also changing breakpoint properties while debugging is reflected immediately, different than before.
    PHP 5.3.10, Apache2, Linux (kubuntu), Eclipse Version: 3.7.2 Build id: M20120208-0800

  27. Vitaly says:

    Hi, had the same problem.
    Win7 x32
    PHP 5.4 with xdebug
    php.ini
    zend_extension = “C:\xampp\php\ext\php_xdebug.dll”
    zend_extension_ts=”C:\xampp\php\ext\php_xdebug.dll”
    xdebug.remote_enable=true
    xdebug.remote_host=localhost
    xdebug.remote_port=10000
    xdebug.remote_handler=dbgp
    xdebug.profiler_enable=1
    xdebug.profiler_output_dir=”C:\xampp\tmp”

    Solution:
    1)Download from http://xdebug.org/download.php last version Xdebug.
    2)Change php.ini
    zend_extension = “C:\xampp\php\ext\php_xdebug-2.2.1-5.4-vc9.dll”
    ;zend_extension_ts=”C:\xampp\php\ext\php_xdebug.dll”
    3) Apply Vlad solution.
    4)Apply Kevin solution. Uncheck “Show super globals in variable view” found in:
    Window->Preferences->PHP->Debug->Installed Debuggers->XDebug
    and set
    “Max array depth” = 128
    “Max childre”=400

    Thanks

  28. Pingback: Setting up your workstation for Joomla! development — Part 2 | OMG-Gurubootcamp!! Open Source

  29. charlycharles says:

    I solved this quitting Mozilla as default browser in eclipse.

Leave a Reply

Your email address will not be published. Required fields are marked *