Questions tagged [debug-logs]
The debug-logs tag has no usage guidance.
133
questions
18
votes
2
answers
9k
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 ...
16
votes
2
answers
21k
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 ...
13
votes
2
answers
10k
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 ...
12
votes
2
answers
8k
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 ...
11
votes
1
answer
6k
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. ...
9
votes
3
answers
5k
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 ...
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 ...
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 ...
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
...
7
votes
1
answer
1k
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 ...
6
votes
3
answers
6k
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,
...
6
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 ...
5
votes
1
answer
2k
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 ...
5
votes
1
answer
211
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.
...
5
votes
1
answer
4k
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 ...
5
votes
0
answers
832
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 ...
4
votes
4
answers
2k
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 ...
4
votes
3
answers
1k
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]|...
4
votes
1
answer
688
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 ...
4
votes
1
answer
382
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 ...
4
votes
1
answer
2k
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 "...
4
votes
1
answer
319
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 ...
3
votes
2
answers
9k
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;
...
3
votes
0
answers
62
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 ...
3
votes
0
answers
309
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 ...
3
votes
0
answers
1k
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 ...
3
votes
0
answers
536
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 ...
3
votes
0
answers
433
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 ...
2
votes
1
answer
8k
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, ...
2
votes
3
answers
3k
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 ...
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 ...
2
votes
1
answer
301
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 ...
2
votes
1
answer
1k
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 ?
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?
2
votes
1
answer
126
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 ...
2
votes
1
answer
385
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?
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 ...
2
votes
1
answer
133
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/...
2
votes
1
answer
716
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 ...
2
votes
1
answer
803
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, ...
2
votes
1
answer
111
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 ...
2
votes
0
answers
278
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 ...
2
votes
0
answers
101
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 ...
2
votes
1
answer
170
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 ...
2
votes
0
answers
508
views
How can I get Debug Logs for Apex code in my Managed Package which is invoked via Execute Anonymous on the Subscriber Org?
I have installed a Managed Package and connected it via the LMA. The subscriber org shows up under the Subscribers-Tab. An user on the subscriber org has granted me (as package provider) login access. ...
2
votes
0
answers
1k
views
How can I view my test classes debug logs of an ant deploy
I have about 20 classes that I deploy to production via ant.
Some of my test classes fail.
I want to view the debug logs but I cannot find the way to look at the logs of my ant deployment.
Any help ...
1
vote
2
answers
323
views
Hide Debug Logs of Managed package
We have a managed package installed, where we have performed several customizations. Now, it is needed to test the whole solution end-to-end. But i have to issues:
Managed package has a VF page ...
1
vote
1
answer
1k
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?
1
vote
1
answer
300
views
Developer Console: Keep constantly open without stopping producing debug logs
If i open developer console and leave it open without any activity, i get a message after (e.g. 1hr) that
"Your Developer Console session has been idle. To resume logging and listening for ...
1
vote
1
answer
217
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 ...