Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [debug-logs]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
19 votes
2 answers
12k views

Developer Console suddenly truncating System.Debug output

Like many devs, I use JSON.Serialize() with System.Debug() to output large lists/objects to the Debug Log when needed. Over the past few days, I've run into a new issue with Developer Console where ...
Jason Clark's user avatar
  • 11.9k
17 votes
2 answers
25k views

Maximum log level exceeded in Developer Console

Recently I have regularly been getting the error message below when opening the Developer Console: The Developer Console didn't set the DEVELOPER_LOG trace flag on your user. Having an active ...
Jelle van Geuns's user avatar
14 votes
2 answers
13k views

System.debug(JSON.Serialize(o)) Not longer shows full string

For the longest time I have been using System.debug(JSON.Serialize(o)) to output objects to the debug log for troubleshooting purposes. This has worked up until my most recent project. Even existing ...
gNerb's user avatar
  • 9,491
12 votes
2 answers
11k views

How are we supposed to use debug logs for a specific Apex class only

I'm trying to capture the logs for a specific class for a user with a lot of transactions (hundreds in any given minute). For example, the user will have 100 transactions done in a minute that will ...
Jorjani's user avatar
  • 2,212
11 votes
1 answer
8k views

What is the purpose of Apex Class Trace flags?

I have an Apex Batch Class that I'm trying to view the debug logs for. I know that I can do this in the Dev Console, but the data and amount of logs its returning is causing the Dev Console to freeze. ...
thinker's user avatar
  • 1,430
9 votes
4 answers
6k views

How to see anonymous code debug logs in visual studio code?

I installed the Salesforce CLI and the Salesforce Salesforce Extension Pack on Visual Studio Code because it's easier to write code than the Developer Console but I got a problem. I want to get the ...
Stefano 's user avatar
8 votes
4 answers
2k views

is there a way to check a debug statement belongs to which class

Is there a way to know if we can get class name or trigger or a component along with a debug statement like a system.debug line no and class to which it belongs? I asked this because i came along a ...
user75937's user avatar
  • 299
8 votes
1 answer
4k views

Debug Log Traced Entity Type Apex Class

I am setting the debug log Entity Type to APEX Class and it is not logging anything when I call the class. The class I am setting it as is definitely being called, the date/time is set to 24 hours ...
Olivia's user avatar
  • 3,461
8 votes
1 answer
2k views

How to debug Post-Install script?

We don't get much information on email received by subscriber if Post-install script fails. Problem: Unexpected Error The package installation failed. Please provide the following ...
Pasan Eeriyagama's user avatar
7 votes
1 answer
2k views

Enabling Debug Logs

I'm using unlimited edition of Salesforce. I would like to enable debug logs for a user for a particular period of time. Currently Salesforce is only enablling a maximum period of 24 hours to enable ...
Manu Murukesan's user avatar
7 votes
0 answers
2k views

Mass delete Debug logs using Developer Console: Invalid cross-reference id

Given warning in Developer Console that Debug Logs exceeded limit and some must be deleted in order to set new trace flags execute in DC (via Tooling API option in Query Editor) Select Id from ...
cropredy's user avatar
  • 71.7k
6 votes
3 answers
7k views

How to Query ApexLog raw body?

I need to find, in ApexLogs raw bodies, references to a given String value. I know we can query the object ApexLog fields, by using the following code: SELECT id, loguserid, ...
Matheus Gonçalves's user avatar
6 votes
4 answers
2k views

How to analyze Apex CPU consumption

Is there a tool or a recommended approach to analyzing Apex CPU consumption based on a debug log? For example, consider the log entries below. 18:47:41.12 (7012039114)|CODE_UNIT_STARTED|[EXTERNAL]|...
Marty C.'s user avatar
  • 4,449
6 votes
1 answer
616 views

Is there a way to create Trace Flags for certain user using SFDX?

I'm just tired of manually setting trace flags on my org. My question is, is it possible in any way to create trace flags using SFDX? Or is there any APEX script to create these trace flags for ...
Rechu's user avatar
  • 452
6 votes
1 answer
5k views

Proxy on all Objects and Arrays logged in LWC - Salesforce

Good afternoon, Witnessing strange behavior today in the browser's developer console when logging objects and arrays from my lightning web component. All objects and arrays are being logged as "...
Blake's user avatar
  • 131
5 votes
2 answers
11k views

How to Delete All Debug Apex logs in Apex? [duplicate]

I'm trying to delete the complete Apex debug logs but getting DML operation Delete not allowed on List<ApexLog>. Code: List <Apexlog> loglist = [Select Id from Apexlog]; delete loglist; ...
Issac Pal's user avatar
  • 107
5 votes
1 answer
3k views

Writing too much to debug log increases heap and cpu time

I have just observed that writing to debug log using System.debug increases heap size as well as CPU time. Is this normal. Please see the screenshot below for the comparison. The first one with so ...
Bforce's user avatar
  • 6,828
5 votes
1 answer
233 views

Omit debug logging for specific Apex class

Scenario I do not want information that is processed by an Apex class called SecureProcessor to make it into the debug log, regardless of the level of logging enabled within Salesforce Setup. ...
Robs's user avatar
  • 9,346
5 votes
1 answer
5k views

Custom visualforce component inside Visualforce Email Template: How to see apex debug messages?

I am using a custom visualforce component with an apex controller inside a Visualforce Email Template (See example below). How to see debug messages from the controller class of the visualforce ...
Vladimir Romanov's user avatar
5 votes
1 answer
511 views

Debug Log Levels Ignored

I have a class that has too many SOQL query error. Normally I'd set debug log levels to my DB Trace level When I run my test method that throws the error, the logs are too large so it only shows 3 ...
gNerb's user avatar
  • 9,491
5 votes
0 answers
1k views

Limits information not appearing in debug log

I need to debug a governor limit issue in a particular procedure but I'm not getting the LIMIT_USAGE_FOR_NS section in the debug log even when I set Profiling to Finest. I expect to see this in the ...
David Cheng's user avatar
  • 7,084
4 votes
6 answers
3k views

Mass delete Debug logs using Salesforce DX

In my developer sandbox the Apex logs count has exceeded beyond its limit and there are more than 1 lakh records created in it. I want to mass delete them, but not able to do so. I am using the ...
Akshay Vasu's user avatar
4 votes
1 answer
829 views

Apex Replay Debugger: Cannot read property 'name' of null

When I select Launch Apex Replay Debugger in VS Code it asks me to select a log file and then gives me this error message: Cannot read property 'name' of null I've managed to get the Apex Replay ...
Robs's user avatar
  • 9,346
4 votes
1 answer
442 views

How to exclude logging by class in Summer 17 and later

I have searched and found this, but it is not the same question. I would like to suppress log statement for some classes. In older versions of Salesforce we were able to do this via the Trace Flags ...
Maggie's user avatar
  • 316
4 votes
0 answers
486 views

Is Anyone Else Seeing sfdx force:apex:log:tail Only Using The SFDC_DevConsole DebugLevel Regardless of Setting --debuglevel Flag

Okay so I've read the answer here How do I set the log levels for force:apex:log:tail? as well I have read all the documentation I can find for the sfdx force:apex:log:tail command. And everything I ...
gussamer's user avatar
  • 103
3 votes
0 answers
100 views

Formatting and color of values of objects logged in chrome devtools is unreadable in dark mode

After the Winter 23' release added Lightning Web Security I started having a problem viewing the values of JavaScript objects. Correct me if I'm wrong but to debug LWC in chrome devtools with LWS ...
Monakus's user avatar
  • 31
3 votes
0 answers
541 views

Why doesn't flow debug info show in my debug log?

I'm logged into Salesforce Lightning, Health Cloud Admin I open the Developer Console and set the flow debug levels to finer I go to an Account record and click Schedule Appointment I complete the ...
Chris P's user avatar
  • 31
3 votes
0 answers
2k views

SFDX: Get Apex Debug Logs returns "undefined"

This is driving me insane - I am no longer receiving full log files when running SFDX: Get Apex Debug Logs via VS Code's command palette. Instead, I get an empty file with the correct file name, but a ...
coreyperryisasaint's user avatar
3 votes
0 answers
896 views

Exception.getStackTraceString() returning '()' on object with managed package trigger when debug logs not on

First of all, my question is very similar to this one and might actually be a duplicate, however there is no notion of a managed package or debug logs there. We have an after insert trigger on ...
Robin De Bondt's user avatar
2 votes
1 answer
11k views

How to obtain trigger log from Email2Case?

I have a trigger on EmailMessage that is looking at newly inserted emails sent for Email2Case, and parsing the text for certain trigger words and updating the case if found. This has been working, ...
Jason Clark's user avatar
  • 11.9k
2 votes
1 answer
2k views

Who runs Email-to-Case

I am trying to debug the case trigger when I create a case via Email-to-Case. But I don´t know which user run the trigger. Any help?
manukadi's user avatar
2 votes
1 answer
2k views

How do I set the log levels for force:apex:log:tail?

I'm in SFDX/VSCode, using the sfdx force:apex:log:tail command. That makes it easy to pull up the latest log, but when I try to launch the debugger, it says I need Apex at FINEST and VisualForce at ...
PatMcClellan__c's user avatar
2 votes
1 answer
545 views

Reading Debug Logs to Determine What's Using CPU TIme

There is a flow running that attempts to insert ~150 opportunities. It is failing with a CPU Time Limit Exceeded error. When I attempt to reproduce the issue using debug on the flow, I'm getting ...
Jeff's user avatar
  • 145
2 votes
1 answer
60 views

Debug Log shows Flows executing in a different order to Flow Trigger Explorer

Just wondering if someone can help me to understand what I'm seeing in our org. I'm trying to document the order in which our automation runs when a Lead is created. My problem is that I'm seeing ...
Matt's user avatar
  • 61
2 votes
3 answers
4k views

Visual Studio Code - Developer Console

I have been trying to use Visual Studio code over the Developer Console because I understand that this will be the new standard for Salesforce however I find myself using the Developer Console with ...
CodeMonger's user avatar
2 votes
1 answer
340 views

unable to get the debug log of a site guest user [duplicate]

I am trying to track log of the site guest user. So I have created a debug log for the guest user. In order to spot which one is the guest user, I go to the site setting > public access setting > view ...
Lance Shi's user avatar
  • 13k
2 votes
1 answer
1k views

What is the difference between "System debug logs" and "Monitoring debug logs"

The Salesforce article on debug logs (currently found here) states that "System debug logs are retained for 24 hours. Monitoring debug logs are retained for seven days." What is the ...
Joe Flowers's user avatar
2 votes
1 answer
2k views

How can I see debug logs, when the record is created by System as a user?

I am trying to setup a trace flag to debug. When I select User in the dropdown and try to find System in there. It doesn't show up. What can I do ?
manb's user avatar
  • 95
2 votes
1 answer
2k views

Developer Console Debug Logs Viewer

How can i see the entire body of the last debug log in developer console in Salesforce?
GroundToCloud's user avatar
2 votes
1 answer
984 views

Error when trying to debug log file: Unable to retrieve breakpoint info from language server, language server is not ready

I receive the following error when trying to debug a log file: Unable to retrieve breakpoint info from language server, language server is not ready. I already reloaded my VS Code window, what ...
PieterJacob's user avatar
2 votes
1 answer
228 views

Analyse apex logs

I am trying to analyse an apex log to find the operation taking maximum time. I am using log inspector. Under Execution tree : Workflow:user duration is in negative ( -69,295) - What does this ...
Manish Anand's user avatar
2 votes
1 answer
436 views

How to send debug log with email

Assume that We have try catch structure and if exception throw, I want to send all debug log in email as an attachment. Is that possible?
Halil İbrahim Özdemir's user avatar
2 votes
2 answers
8k views

i am unable to create debug log. Getting error

When i try to create debug log i am getting below error. Even i have deleted all user trace flags and checked in dev console also by querying user trace flags. Having an active trace flag triggers ...
Vinothini Murugesh's user avatar
2 votes
1 answer
150 views

Issue with DateTime.Parse method in EU salesforce Instances

String dtTimeStr1='10/14/2011 11:46 AM'; DateTime dtTime= DateTime.parse(dtTimeStr1); The above piece of code runs successfully in NA instances but in EU instances it throws an error Invalid date/...
Venkata's user avatar
  • 99
2 votes
1 answer
909 views

How Can I Capture Debug Logs From Login Flows?

We're running into a funky error with a login flow, where users logging in to our Community see a weird prompt/error page before they can log in. We've had the login flow for a long time and haven't ...
Benj's user avatar
  • 11.2k
2 votes
1 answer
999 views

Unable to retrieve related records in Test Class using SOQL

The following SOQL in test classes gives a list of contacts but it doesn't lists any related account fields. List<Contact> contacts = new List<Contact>([Select Id, Email, AccountId, ...
user1206's user avatar
2 votes
1 answer
247 views

Prevent flows from writing sensitive data to debug logs in plaintext

We have a screen flow that collects a password from the user using a Password field component. That masks the input on screen, but when looking at debug logs, the value of that field gets written to ...
Ryan Brubaker's user avatar
2 votes
0 answers
337 views

What are ConduitEventConsumer-pool-9687-thread-2 in Platform Event Debug Logs

This is the first time I saw something like this. We fire Platform Events from many places, and they are in plenty, you can say around 100 in a minute in worst case scenario. Is there any kind of ...
Somya Tiwari's user avatar
2 votes
0 answers
120 views

With Lightning UI enabled - is it possible to stop /aura Operation spam in Developer Console's log panel?

When I have Lightning UI Enabled, Open the Dev Console and toggle to the "Logs" tab, my log is spammed with nearly endless /aura operations. This slows down my general experience in lightning as ...
Morgan Marchese's user avatar
2 votes
1 answer
188 views

Force.com Site - Data not loading - No log

I have a simple Force.com site made of few VisualForce pages. I use the same code also in Salesforce (button on Opportunity object). In Salesforce everything work very well but on Force.com site ...
Raphael D's user avatar
  • 616