[SalesForce] VF Controller System.debug output not appearing in log file

I've got my Apex Code debug log level set to FINE (was DEBUG) and System debug log level set to FINE (was DEBUG). I'm still not seeing the result of my system.debug statements in the log file. I've also changed logging level on the system.debug statement to LoggingLevel.ERROR.

The code in question is initiated by a button press in a Visualforce page. Also, the log file has not been truncated.

What have I missed? Debugging apex when I can't get to my system.debug output is just about impossible.

Visualforce button code that calls the Apex method:

<apex:pageBlockSectionItem >
<apex:commandButton action="{!removeSelectedNow}" value="Remove Selected Now" rerender="tablepanel,tableblock,table,panelMsg" id="theRemoveBtn"/><p/>
</apex:pageBlockSectionItem>  

Apex code:

public PageReference removeSelectedNow() {
system.debug(LoggingLevel.ERROR,'xyzzy-removeSelectedNow() - start');
...

Best Answer

When using a apex:commandButton with an action= attribute, SFDC will first decode the view state, then use the values from the form (or enclosing actionRegion) by calling the respective setters in the controller and then invoke the action method.

If the setters blow up with an uncaught exception, the action method will never get invoked and your debug statement will never appear.

This is all documented in the VF Order of Execution (excerpted below - you may be failing at step 2)

enter image description here