Just so I understand, you did the following steps:
- Set the monitored portal users in the Debug Log Page
- Open the developer console and unchecked "Show my current logs only" (sort by time so new logs show up on top)
- Executed apex as the portal user
After those steps, a log should appear in the developer console or the Debug Logs page. If no log appeared with the user in the monitored users list, then you should open a case.
Let me take a minute to go over how Trace Flags are used. Trace Flags have 3 different fields we care about.
- scopeId : The scope at which we generate a "debug" or "system" log. The only difference is the way the logs are stored. Supports either a user id, empty id, or null.
- tracedEntityId : The entity we want to trace. Either a user id or an apex class/trigger.
- expirationDate : When we should we stop logging.
Monitored users (debug logs) create a trace flag with a scopeId = null and tracedEntityId = "id of user to monitor".
Developer console (system logs) create a trace flag with a scopeId = "id of you" and traceEntityId = "id of you". If you close the developer console, it will expire just that one trace flag so system logs stop being generated. This is what happens when the developer console is open for too long being "idle" is the trace flags expire, so resume will re-enable the trace flags. The log panel in the developer console only shows apex logs create by you since the console was open or 'Clear'ed. When you uncheck "Show my current logs only" it should show all the apex classes on the org, regardless of user or type.
If you set up class level filtering, it will create a trace flagwith the tracedEntityId to the class you want, and will be applied for all users (debug and system).
When I say "create" above, I really mean it will check if one already exist. If so, it will update the expiration date. If not, it will create one. That known issue specific to monitored users in the Debug Logs page is because it wasn't setting the expiration correctly. That is why deleting it works, because then it will create a new one.
OK, SFDC Support provided the workaround
Test Run creates an entry in the Tests tab labeled Test @Invalid Date.
Once I run a test of an Apex class, clicking Test Re-Run does not actually launch a repeat of the previous test (at least no new test
entry appears in the Tests tab. Manually re-selecting the class does
not run it either (at least as far as the Test tab is concerned)
- Logs don't always appear (or rarely appear) from any tests run through the developer console; setting is 'Show My Current Logs only'
- Debug | Resume does nothing; no refresh of any tests or logs
Issues 2-4 can be worked around by doing the following sequence:
- Test | New Run | select class(es)
- Test tab shows test running, test completes, Logs tab shows test log
- In the Test tab, double click the class that you ran (say, class 'Foo'). This opens a tab at the top of your workspace for that Test run with all classes ran in that test. You can see method-by-method test results.
- Test | Re-run - will execute the tests in the classes appearing in the tab from step 3
Essentially, the Developer Console 'forgot' the test classes you selected in step 1 so when you click Test | Re-run, there is nothing to re-run. By double clicking your test results, Developer Console's "memory" is jogged and it is now ready to execute your Test | Re-run.
Developer Support noted that many Dev Console issues should be fixed 'real soon'. Hopefully this will include Issue 1 which is a Firefox issue only as well as an intuitive fix for issues 2-4.
Best Answer
If it has been a little while since you used it, it stops updating the list with new logs. You can click on "Resume updating" which appears in the top list of buttons just to the right of where you can enter anonymous apex. (The button only appears when it has stopped updating the log list)