1

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?

enter image description here

2
  • 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. Sep 22, 2023 at 9:39
  • It was java settings. Thank you for your input found a theme that I like more!
    – YCS
    Sep 23, 2023 at 16:03

1 Answer 1

2

Check the Java setting for the Apex Language Server. It should work if the path is configured properly.

  1. Select File > Preferences > Settings (Windows or Linux) or Code > Preferences > Settings (macOS).
  2. Search for apex.
  3. 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.

enter image description here

enter image description here

1
  • Buttons are here, Thank you!
    – YCS
    Sep 23, 2023 at 16:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .