While working with a co-worker. Realized his VSCode has a button to execute Anonymous Apex. Rather than using commands to execute 'SFDX: Execute Anonymous Apex with Currently Selected Text' or 'SFDX: Execute Anonymous Apex with Editor Contents', he simply clicked this button which's location is shown in the picture. He also does not know why he has it. Looked for extensions but could not find anything related. Any suggestion?
-
Thats from standard button "Salesforce official extension". May be a theme issue. Can you change your theme and check if that button is visible? Or an pending update on extension.– Nagendra SinghSep 22 at 9:39
-
It was java settings. Thank you for your input found a theme that I like more!– YCSSep 23 at 16:03
1 Answer
Check the Java setting for the Apex Language Server. It should work if the path is configured properly.
- Select File > Preferences > Settings (Windows or Linux) or Code > Preferences > Settings (macOS).
- Search for apex.
- Change the salesforcedx-vscode-apex.java.home setting to the full pathname of your Java Runtime. Do not set it to the Java executable itself. Note that this pathname can’t point to a location inside your project folder.