110
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"...
12
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:
...
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-...
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
7
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 ...
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(); ...
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>();
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": ...
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 ...
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 ...
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 ...
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?&...
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 ...
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 ...
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.
...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
apex-debugger × 23debugging × 9
apex × 7
debug-logs × 7
vs-code × 5
salesforcedx × 3
debug × 3
apex-replay-debugger × 3
trigger × 1
lightning × 1
lightning-web-components × 1
error × 1
salesforce-id × 1
scratch-org × 1
eclipse × 1
isv × 1
developer × 1
visualstudiocode × 1
apex-variable × 1
stacktrace × 1