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?
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.