Skip to main content
117 votes
Accepted

Error while updating debug log trace flag

I have faced this issue, which I fixed it by deleting all debugs logs from developer console. In dev console, Select tab "Query Editor" at the bottom of the console Select check box "Use Tooling API"...
Pranay Jaiswal's user avatar
13 votes

Error while updating debug log trace flag

The short term solution is to keep playing whack-a-mole~ApexLog as Pranay has suggested. Longer term, the problem comes back to the Summer'18 update Store Larger Debug Logs with Changed Log Limits: ...
Daniel Ballinger's user avatar
10 votes
Accepted

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

Open the log in dev console and select Debug Only. Then select the columns File and Method In the above image, File corresponds to the Id of class which can be opened directly from url with /<--Id-...
salesforce-sas's user avatar
8 votes
Accepted

How do I create a map with different element types in APEX

You could do this : Map<String, Object> data = new Map<String, Object>(); Map<String, Contact> contact = [...]; List<OrderItem> items = [...]; Account account = [select Name ...
Emmanuel BRUNO's user avatar
7 votes
Accepted

Limitations of Apex Replay Debugger in VS Code

It can't simulate all variable states. To capture more info, use Checkpoints. See https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_vscode_replay_debugger.htm
Bo Laurent's user avatar
6 votes

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

The line numbers do appear in the debug logs, e.g. 08:02:34:164 USER_DEBUG [375]|DEBUG|LINE ITEM COUNTER B:1 That "[375]" in the log is the line number that this particular system.debug(); ...
Derek F's user avatar
  • 62.7k
4 votes

How do I create a map with different element types in APEX

This Map<String, Map<String, Object>> data = new Map<String, Map<String, Object>>(); Should be Map<String, Object> data = new Map<String, Object>();
Willem Mulder's user avatar
3 votes

Salesforce DX Apex Debugging license issue

You need to enable debugging in the scratch org by adding the "DebugApex" option to the "features" attribute of the scratch org definition file: { "orgName": "Acme", "country": "US", "edition": ...
sfdcfox's user avatar
  • 497k
2 votes
Accepted

Unable to set breakpoints in Apex Debugger when using ISV Partner login

The error message "The chosen operation is not enabled." usually comes up when there is something broken in an Eclipse installation. There are multiple ways to debug this. For example, one way is to ...
Gunnar's user avatar
  • 136
2 votes
Accepted

System.debug does not output when written in trigger

It works for me. The only things to keep in mind here are: 'Apex Code' is set to at 'Debug' in Debug Level. The log size is not greater than 2MB. The user you want the logs for has a valid entry in ...
Lightning Evangelist's user avatar
2 votes

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

You can easily get a Class name and method name from debug logs. Let's say you found a line (debug, SOQL query, whatever...) and you want to know where it is called. Just go up line by line and find a ...
Yevhen Kharchuk's user avatar
2 votes
Accepted

Which is best Apex Replay Debugger or Apex Debug logs?

The debug log is data, while the Apex Replay Debugger is an executable. As such, you can't compare the two, much like you can't say "What's better: Microsoft Word or a Microsoft Word document?&...
sfdcfox's user avatar
  • 497k
2 votes
Accepted

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

I found out myself how to solve this (with the hint of a colleague). Go to the settings of VS Code and search for "salesforcedx-vscode-apex". Look for the Java: Home entry and paste there ...
PieterJacob's user avatar
1 vote

How to setup debug log for batch apex

There are basically two options open to you: Ensure that you set up a Debug Levels definition that minimizes most of the captured data, as covered in the documentation, whilst definitely capturing at ...
Phil W's user avatar
  • 37k
1 vote

System.debug does not output when written in trigger

There is one more solution that you have to create debug log in setup. Please see below for the steps to create debuglog. Goto -> Setup -> Search by "debug logs" and click on "debug logs" link. ...
Prem Anandh's user avatar
1 vote

Non-DX VS Code Debugger

Regardless of which extensions you are using, as long as you have the cli installed, and you just want to emit your debug statements, this will work in VS Code, go to the terminal window and enter ...
Shanerk's user avatar
  • 1,076
1 vote
Accepted

i am getting Attempt to de-reference a null object in batch class but unable to trace where the error causing

Batch classes work on a large amount of data and thus they create large debug logs. We can have only 2Mb of debug logs for each batch iteration, thus you have to modify your code to remove extra ...
Pranay Jaiswal's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible