13

Hey guys I can see that salesforce says Debug Logs(3) but I cannot see them. Why is this? I am attaching a photo as a reference. enter image description here

  • 3
    I have seen this behavior many times in multiple orgs (logs do exist in the dev console though). Just waiting for SF to figure it out and fix it. Since one cannot report anything without being directed to the dev forums (they should send people here) they may not be aware although I highly doubt they have not run into it themselves.. – Eric May 1 '17 at 19:05
  • Thanks for your answer eric. Do you want to post as an actual answer so I can marked it as resolved. I didn't know that the dev console had these logs there. It would be useful to mark it as best answer in case other people google this. – Arthlete May 1 '17 at 19:11
  • The section of the page above what you posted has a list of the users you are currently filtering your view by. Perhaps if you change your user list view to 'All' you will see the missing logs. – Jeremy Nottingham May 2 '17 at 13:33
11

have seen this behavior many times in multiple orgs (logs do exist in the dev console though). Just waiting for SF to figure it out and fix it. Since one cannot report anything without being directed to the dev forums (they should send people here) they may not be aware although I highly doubt they have not run into it themselves.

In my case, opening the dev console and unchecking "Show my current logs only" allowed me to view existing logs. Although I cannot say for sure if they were all there since I could not see what was in the UI version...

| improve this answer | |
10

Just in case it is helpful, you can also directly query for the Debug logs yourself using ApexLog. It's accessible in both the Partner API and the Tooling API. You would typically filter the ApexLog records by LogUserId.

Once you have the ID of the log you want you can then download it with:

/apexdebug/traceDownload.apexp?id={ApexLog.Id}

Or you can even force the Developer Console to open the log by ID with a bit of JavaScript hacking.

| improve this answer | |
  • Nice tip. With the console jumping and not letting me see the end of the log as well as various other issues this will be useful.... – Eric May 1 '17 at 21:12
  • @Eric I've got a bad case of "Not invented here" and like to use a log reader of my own design. – Daniel Ballinger May 1 '17 at 21:20
  • 1
    I know what you mean. I have become reliant on Illuminated Cloud's Apex Log debugger to step through the code, view stack etc all within context of the actual code. Best way to debug IMHO. illuminatedcloud.com/home/offlinedebugger - I have looked at yours before but unfortunately (not really) i am on a mac and it looks like I cannot use it :( nice work though – Eric May 1 '17 at 21:41
1

One way as a workaround, assuming you're working with Apex code, is to:

  1. Write a test case for exactly what you are trying to test
  2. Turn on Replay Debugger using SFDX Extension for VS Code
  3. Run your test case from VS Code
  4. Get Apex Debug Logs with SFDX Extension.

I see my test case debug log in the Dev Console and the list returned from Get Apex Debug Logs even if I don't see the log that I should've seen from trying it through the UI. I know it's not pretty but depending on requirements, it may be better than waiting until they magically start showing up again.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.