function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
James George 717James George 717 

VS code to dispaly only debug logs while executing Anonymous Apex

Hi All,
Is there any way to display only Debug logs, while executing anonymous apex on VS code.
Current all the junk data is displayed and makes it hard to read the debug values.

Any help appreciated

Thanks,
James
Best Answer chosen by James George 717
Suraj Tripathi 47Suraj Tripathi 47
The other way to implement this-
Goto output tab and press CTRL + F then paste |USER_DEBUG| inside box and press Enter.
Now, Debug statements are highlighted, now you can find them easily.

If you find your Solution then mark this as the best answer. 

All Answers

Suraj Tripathi 47Suraj Tripathi 47
Hi James George,
Greetings!

If you want to see only debug log while executing Anonymous Apex.
Please use Logpoints feature of the debugger in VS Code.
for refer- https://code.visualstudio.com/docs/editor/debugging#_logpoints

If you find your Solution then mark this as the best answer. 

Thank you!

Regards,
Suraj Tripathi
James George 717James George 717
Thanks Suraj, thanks for your comments.
Unfortunately it did not work.

Thanks again for your time.

Regards,
James
Suraj Tripathi 47Suraj Tripathi 47
The other way to implement this-
Goto output tab and press CTRL + F then paste |USER_DEBUG| inside box and press Enter.
Now, Debug statements are highlighted, now you can find them easily.

If you find your Solution then mark this as the best answer. 
This was selected as the best answer
James George 717James George 717
Thanks for your comments, this one works
月晟 苏月晟 苏
I think I understand what you mean, you want to output only the content of system.debug() and other related information in OUTPUT, but now vscode outputs too much content that we do not need.
I also encountered this problem, but it was not resolved, I have submitted an issue on GitHub.
Do you know how to solve this problem now?
Tomislav HegedusTomislav Hegedus
So, James, please help with this if you know how to do it now. So, is there any way to display only Debug logs, while executing anonymous apex on VS code?