function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MarkL.ax269MarkL.ax269 

system log not working

This might be a dumb question, but for some reason I can't get the system log to return any information.  I've got the window open set to Apex Code/Debug, and I know my triggers are executing because I've got field updates.  But the system log remains silent, despite multiple System.debug calls.  This worked just fine last week, no idea why it's not now.  I made a couple minor edits to a trigger but that's it.  I did purposely create an error and that came back in the UI fine, futher verifying that the trigger is firing and is calling my apex class.  Field updates with my "debug" messages work and place the messages into the field, so it's definitely stepping through all the code.

I'm running Firefox 2.0.0.11 and Eclipse 3.3.1.1 with the latest Force.com IDE, on MacOSX 10.4.11.  I just cleared out the cache, reloaded and still nothing.  There's probably a really easy answer here, but what is it?

Mark
Ron HessRon Hess
when i get stuck with the browser debug log (once in a while),
i look to the debug log monitoring that is built into the app.

it's here:
https://na5.salesforce.com/p/setup/layout/ApexDebugLogEdit?setupid=ApexDebugLogs

also works great for debugging incoming email to apex classes

you may have to modify the "na5" to match your server
this log never fails.


MarkL.ax269MarkL.ax269
Thanks Ron, yes that log works but it's not nearly as convenient.  Here's something else strange.  I just tried the browser log again and with the window open in the background, edited and saved a record.  It actually popped up a second log window!  Of course it was empty too.  I would really like this to work again.

Mark
Ron HessRon Hess
since you are on the Mac ( as am I), i'll add this bit of advice:

i find that i have to restart my powerbook every few months, or when i see this type of thing happen, your mileage may vary.

Also, i use Safari as my favorite browser now, and go back to Firefox when i need to use firebug.
MarkL.ax269MarkL.ax269
Thanks Ron, I appreciate the help.  I just tried Safari and got the exact same behavior, no response from the log window and it actually popped a new window just like Firefox did, very strange.  This tells me it's either some IE-optimized function that isn't agreeing with other browsers, or a Mac issue somewhere.  I'm a former Windows user (still use it with Parallels) so I actually shut down the Mac every night, rarely putting it to sleep overnight.  Old habits die hard.  I don't typically use Safari (though it is a bit faster) because the Salesforce config, particularly page layout editing, does not work as well in Safari.  I also work with a lot of scontrols so having Firebug readily available is a big plus.

As soon as I recover a crashed Parallels hdd file (it's been a really good week), I'm going to try the system log there.  If nothing else that will allow easy debugging while running Eclipse on a different screen.  It wouldn't bother me so much if it hadn't been working perfectly just last week.

Mark
paul-lmipaul-lmi
i got frustrated with the limitation of only storing 20 logs per user and then turning itself off, so i now do all my debugging by email.

my catch statements call a class that sends an outbound email to me if an exception is caught.  this saves me literraly hours of trudging through the web interface and making sure logging didn't magically turn itself off.

one thing that would be nice is if there were a way to programmatically access the same line by line data the log has, rather than just the error message, but beggars can't be choosers i guess.
MarkL.ax269MarkL.ax269
I got even more annoyed when Firebug, which has been working perfectly for over a year, suddenly decided to stop refreshing the script window.  It will still step through the code, but I have no idea where it is because the visible version of the script is not current.  Really hard to put something together when the tools break!

I was going to try to use Firebug to find the source of the problem, but this kinda killed that idea.  Maybe the two problems are connected somehow?  It's been a bad few days....

Mark
paul-lmipaul-lmi
firebug would only be effective in debugging s-controls as far as I know.  Apex code is run server side, so I don't think firebug would help much in that it's only good for browser based debugging.
MarkL.ax269MarkL.ax269
That's right.  But the debug log has some client-side scripting and I was going to see if I could discover what the log itself was doing.  Of course I'm also working on an application that uses scontrols, apex classes and triggers and without Firebug and a real-time debug log, it makes app development much harder than it should be.  I may actually set up Venkman....
paul-lmipaul-lmi
i agree.  the SF debugging capabilities are rather poor.  from what i've seen, they areally expect for you to magically know and cover every scenario in a testMethod...
MarkL.ax269MarkL.ax269
I just did a complete clean install of Firefox 2.0.0.12 and no change, the debug log still does not work.  Very frustrating.

Mark
MarkL.ax269MarkL.ax269
I also finally have a clean install of Windows XP running in a Parallels VM.  This is a brand-new hdd file and a completely clean installation of XP.  I have both Firefox 2.0.0.12 and IE7 installed there.  I just tried the system log in Windows on both browsers and it does not work in either one.

I also tried other logins with the same problem, on both Windows and Mac OS..  Then I disabled Windows firewall and the Mac firewall and still no change.  I finally verified with our IT department that no changes have been made to the company firewall either.

Completely frustrated at this point.

Mark
paul-lmipaul-lmi
can you step through exactly what you're doing up to the point where you determine it's not working?
MarkL.ax269MarkL.ax269
Sure.  I have a simple trigger that runs on OpportunityLineItem before insert/before update.  It calls an apex class method that includes an object created by an inner class.  In both the trigger and the class, I have a number of System.debug statement so I can track the state during the run.  I know everything is working fine because I have redirected the output of the System.debug statements to actual fields on the record and they are properly updated.

  1. Login to sandbox org.
  2. Open opportunity line item record in detail mode.
  3. Open System Log in a separate window and set to Debug mode.
  4. Use in-line editing to change the value on one custom numeric field.
  5. Click save.
  6. Watch the system log for the results.
This used to get an immediate response in the system log with a full log of the trigger run.  Now, nothing.

Update: This appears to be related to inline editing.  I just tried it in full Edit mode and the log worked!  FWIW it worked fine with inline editing last week.  Hey at least that gets me working again!

Did something change in inline editing recently?

Mark
paul-lmipaul-lmi
not that i'm aware of, but they definitely sneak changes in under the radar.

i don't personally use in-line editing as the page refresh still has to happen and you have to manually save it when you're done anyways.  it doesn't really reduce clicks or time waiting for pages to load.
TehNrdTehNrd
The popup System Log is not very good. It doesn't matter what settings I put this on I swear it has a mind of its own and spits out whatever it wants. Sometimes my debug statements don't even show up. The user specific logs are better but still not the best as they show tons of work flow info I could care less about.

I still think the first release of the system log was the best. It gave nice clean, relevant info for debugging.


Message Edited by TehNrd on 03-17-2008 01:37 PM
arnt72arnt72
same thing happened to me but the inline editing doesn't do the trick. Did anyone come across a solution for this issue?


Thanks,
Arnt
MarkL.ax269MarkL.ax269
I gave up on the popup log entirely and went to the user logs instead.  Ron is right, that log never fails, except when you forget to turn it on. :) So rather than immediate gratification, I'm now used to setting up for a test, enabling the log, running the test, then reviewing the log.  Much slower and I really wish the popup log was reliable.

Mark