Thursday, March 24, 2011

XDebug issue: Unexpected termination of script, debugging ended

I spent the better part of a day trying to figure out why I could debug a PHP script in Eclipse one minute and the next not at all. Hopefully this will help someone else out too.

My setup is Eclipse Helios PDT and WAMPServer 2.1 with PHP 5.3.5 and XDebug 2.1. I had no problem debugging scripts and then one day, poof! I started getting "Unexpected termination of script, debugging ended" messages and could not step through code at all.

As it turns out there appears to be a bug in the PDT (I can recreate this with multiple XDebug versions) with using XDebug and the Watches panel if you have some watches defined. To get around the error (I don't know if there's a fix) just remove all your watches before debugging by right-clicking on the watches view in the PHP debug perspective and choose "Remove All Watches".

This fixed it for me and I hope it will for you too.

Dummy Coder

Wednesday, March 23, 2011

How to find Oracle database block size

I had a need to find the database block size in Oracle (which is different from the OS block size).  Here's the query for finding that information:

SELECT tablespace_name, block_size FROM dba_tablespaces;

Dummy Coder