Questions tagged [debug]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
34
votes
2answers
20k views

Error while updating debug log trace flag

I am trying to update the debug log trace flag for my user but getting the following error Having an active trace flag triggers debug logging. You have 259 MB of the maximum 250 MB of debug logs. ...
26
votes
3answers
3k views

Writing too much to debug log would affect APEX trigger or Visualforce page performance?

In order to debug we usually write chunks of data to the debug log using System.debug statements. Will writing too many debug logs affect visualforce page or Apex performance in any way?
17
votes
1answer
12k views

Debug logs not working for Site Guest Users (Force.com sites) after the Winter 17 release [duplicate]

Recently our team has noticed that turning on the Debug Logs for a Site Guest User has stopped working. Prior to the Winter 17 release, if you turned on Debug Logs for a Site Guest User, logs appear ...
16
votes
1answer
391 views

What is the 'INTERNAL' debug level?

According to Setting Debug Log Filters, the debug levels for each category are as follows: ERROR WARN INFO DEBUG FINE FINER FINEST However, when we create a new User Trace Flag (Setup > Logs > Debug ...
14
votes
9answers
12k views

Delete all in Debug log

Delete all option in Debug log deletes the log page-wise. Is there any option to delete all the logs in debug at an instance?
12
votes
2answers
4k views

Salesforce doesn't show debug logs

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.
12
votes
2answers
349 views

DateTime.format() unexpected behavior

Hi I am executing following code snippet and after 26/12/2015, date shifted to one year ahead of expected. Date startDate = Date.parse('12/24/2015'); Date endDate = Date.parse('12/30/2015'); while(...
12
votes
2answers
3k views

What is Debug level in new Salesforce Edition?

I wanted to set the debug log to test a class but today after few days when I was trying to set it, I saw its new look and feel in winter'16 release. It asked for event, level etc. I am unable to set ...
12
votes
2answers
546 views

Debug log is filled with USER_INFO

My debug log is completely filled with USER_INFO. I adjusted the log levels in all possible combinations hoping to get rid of this. But that didn't help. Can some one please help me understand what ...
7
votes
2answers
2k views

Is it possible to get current line number in Apex?

I would like to know the current line number, but not by looking in the logs. Like this: System.debug('I am at line ' + currentLine); Where 'currentLine' would be a variable holding the number of ...
6
votes
3answers
383 views

Adding a System.debug changes code behavior

I have the following code Map<Account, Integer> accountsMap = new Map<Account, Integer>(); Account a = new Account(); accountsMap.put(a, 1); a.name='Bob'; //System.debug(accountsMap); ...
5
votes
3answers
8k views

MAXIMUM DEBUG LOG SIZE REACHED

I am running Apex Tests and I need to see the debug value So I have used debug statements similar to below one: System.debug(Logginglevel.ERROR , ' ::::::: My Debug :::::::::::::') ; Still I am ...
5
votes
3answers
10k views

How to print ALL the elements of a List<>?

I would need to print all the elements of a list so to be able to copy them (CTRL+C) . In Debug Log , I can see only the first 10, or something similar . (a temp solution I'm using is to store them ...
5
votes
1answer
6k views

System.debug not appearing in logs from test method

I have the below test method : static testmethod void addToShoppingCart_Test(){ //Line 128 setup(); //Line 129 oppObj.pricebook2id = customPb1.Id; //Line 130 upsert oppObj; //Line 131 ...
5
votes
1answer
983 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
1answer
817 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 ...
5
votes
3answers
476 views

Automatically Remove System.debug statements from Apex Code?

We normally come into situation that, before production deployment we need to remove system.debug('*****'); statements from the code. I am wondering if there any existing tool is available for such ...
5
votes
1answer
520 views

How many users can be monitored in debug log?

As there is no way to get a report or statistics on how many webservice calls made by the users per day and also to find how much response time they are getting while running each visualforce page or ...
5
votes
1answer
4k views

SOQL: No response from the server error

I have below query to run either in workbench or Developer console, query editor. While on workbench, I get error: UNKNOWN ERROR: Error Fetching http headers and in Developer console error as No ...
5
votes
1answer
206 views

Debug Log issues in Winter/Summer '16

Lately we have been noticing issues with the Debug Logs. Missing debug lines Sometimes either CODE_UNIT_STARTED or CODE_UNIT_FINISHED goes missing. For example The log shows when a trigger finished ...
5
votes
1answer
701 views

Logs always showing ENTERING_MANAGED_PKG in dev org

I am developing in a namespaced DE org (not packaged yet) and using standard SFDC_DevConsole debug levels (Apex = Debug, System = Debug, DB = Info) with no trace overrides. But all I see in the logs ...
5
votes
0answers
133 views

No DML_END Issue

Yet another "what gives" question. I have a custom object that is updated upon a button click on a VisualForce Page. I can see in my debug logs that the object has been updated. But when I refresh ...
5
votes
0answers
539 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 ...
4
votes
1answer
300 views

Is it a good practice to set debug points in possible failure points in our Apex code?

For example we're using validation methods to verify customer address. Since this is a paid 3rd party service used by our client, if client missed paying for the service, data validation would fail ...
4
votes
2answers
1k views

Debug logs in developer console?

I am troubleshooting some performance issues with inbound integration to Salesforce. When some data is being sent by external system to Salesforce, the response time of Salesforce to external system ...
4
votes
1answer
415 views

Debug log - CPU Time limit issue

I have specified the query limit as 210 records for which the CPU time limit shows as 14195ms but the maximum CPU time limit seems to be 10000ms in debug log. Maximum CPU time : 14195 out of 10000 ***...
4
votes
1answer
719 views

get set method for value in class

I have a class with a getter and setter method. Could anyone explain how this works. If I am correct it is suppose to get and set a variable between a visualforce page and apex class. Is this also ...
4
votes
1answer
125 views

debug logs not working sites from future mode method

Debug logs not working only in sitemode from future method. But admin mode is working fine (using samecode). could you please give me any ideas.
4
votes
1answer
332 views

Debug Log Application Unknown

We are developing iOS app which is using Salesforce iOS native SDK. We are currently using SFRestRequest class for communicate with SF. But in our "Debug Logs" it shows our log like this. Reqeust ...
4
votes
1answer
2k views

Get Debug Logs with specified log levels for Execute Anonyous via APEX ToolingAPI, SoapAPI or anyhow

A) via ToolingAPI I'm trying to execute apex-code via public ExecuteAnonymousResult executeAnonymousEncoded(String body) of the ToolingAPI.cls from within APEX. So far it works. But I was not able ...
4
votes
1answer
78 views

Is there any way to change definition of default user created for scratch org? [duplicate]

Is there any way to change definition of default user created for scratch org? I would like the default Administrator user to have properties UserPreferencesUserDebugModePref ...
4
votes
0answers
56 views

Debug log Winter '16 release [duplicate]

I have used debug log of previous releases. But the winter '16 release debug log has new terms like Traced Entity and Debug Level. Help for this page does not give much clarity. can you help me out ...
3
votes
2answers
1k 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 ...
3
votes
1answer
411 views

VS Code + sfdx: debug logs [duplicate]

Until a few weeks ago, vs code use to have a reasonable error message if there was an error when deploying. But I notice the last few weeks this is change and it is not very descriptive the problem, ...
3
votes
2answers
5k views

What is the Log level to see apex debug statements?

What is the Log level that should be set to see user-generated debug statements?
3
votes
3answers
803 views

Before Update is being fired twice

I am trying to figure out what is calling my before update twice. Cannot see what is causing this. Background Object: Case Workflow Rules: All disabled PB: All disabled Case Assignment Rules: All ...
3
votes
1answer
163 views

Debug logs for Change Set Validation

I can't seem to get debug logs working for Change Set Validation in PROD. I have checked in the regular Debug Logs section and the Developer Console. They don't show up. The debug logs show up for ...
3
votes
1answer
70 views

trigger is not working , not updating the record

trigger CompareAndChangeOpportunityOwner on Account (after update) { List<Account> SelectedAccount = [SELECT ID,OwnerID, (SELECT ID,OwnerID FROM Opportunities) FROM Account WHERE Account....
3
votes
1answer
1k views

Getting error while trying to use Apex Debugger

We recently purchased APEX debugger feature and when trying to use it from force.com IDE we are getting the following error. "Encountered an error executing remote command Your Salesforce org ...
3
votes
2answers
2k views

Developer Console Not Showing Debug Logs

My Question: How are we meant to setup Debug when using the Developer Console Log List (Tab)? Previously we never had to setup anything, opening the dev console would setup Debug automatically, and ...
3
votes
0answers
66 views

Salesforce1 memory leak with custom vfpage

We create a lightning ready VF page. It works perfectly in Lightning experience on desktop. But it's really slow in salesforce1 on IOS, and look like creating memory leaks we cannot reproduce on ...
3
votes
1answer
332 views

Duration in milliseconds is very high for a batch job and recorded in debug log. What could be the reason for the huge duration?

After One of the batch job ran, i got the log details as follows that shows huge duration in milliseconds. Where could this time consumed? What it means actually? I am worrying that i could have hit ...
2
votes
6answers
2k views

How to show only user debug entries in the Debug Log view?

I am trying to setup filters on the Debug Logs page so that only entries caused by System.debug('foo') in my code show up. Is there a way to do that?
2
votes
1answer
1k views

Where is the Lightning tab in the developer console?

I installed the Salesforce Lightning Inspector Chrome Extension. Now I want to debug my lightning component. I go to extension menu in Chrome, chose Inspect Lightning Component and I am getting this ...
2
votes
1answer
79 views

containsNone() behaviour?

I have a string like this bla bla. In my class I have code like this: String str = 'bla bla'; system.debug(str.containsNone(', ')); //debug result FALSE system.debug(str.containsNone(',')); //...
2
votes
1answer
123 views

Time Limit Exceeded Error

I currently have a page that would send email notification to other users including attachments. But if the number of receivers is too many, I would often get an error Time Limit Exceeded. This is ...
2
votes
1answer
2k views

deserializing JSON returns a null object

I'm trying to deserialize a JSON response into a list, so that eventually I can iterate through the list and create new contacts from the response. This is my first time working with APIs and JSON, ...
2
votes
1answer
5k views

I am getting two summaries (LIMIT_USAGE_FOR_NS) in debug log. why?

I am getting two summaries in debug log. a small portion of one single log is given below. But i do not know the reason why it is happening? 09:31:34.009 (1009893000)|SYSTEM_METHOD_EXIT|[67]|System....
2
votes
1answer
43 views

How to set a debug log to trace the process of the Custom URL order form in Sites

Hi There is a exception Iam getting in the Online order form while submitting it throws the common error for all users, It seems to be an Exception, However I tried to set a Debug logs to trace it but ...
2
votes
2answers
361 views

Why is this Trigger not working

I've a question with this trigger. I checked the register and it launch the trigger but is not doing anything. It doesnt show me the debug messages, even the first one. The idea is that when we are ...