1

[EDIT 9/7/23 : it's now working, even if I didn' restart VC nor my computer ... Any idea how it decided to work today..]

I'm doing Find and Fix Bugs with Apex Replay Debugger's trailhead that focuses on learning how to debug in VSC.

I'm at that stage where I've to use SFDX:Update Checkpoints in Org enter image description here

I'm facing that error : enter image description here

enter image description here

I read about that same problem here, but the fix doesn't help in my case : Here is my configuration of Java Home and Path : enter image description here In my Explorer, that's the folder : enter image description here

Actually it seems ok because Wind+R and java -version cli gives me : enter image description here

I also added in VSC settings the path to jdk 17 : enter image description here

I have no more fix ideas, feel free to help ... !

5
  • Hi @Alexis, Seems like a tough nut this one. I looked into my system variables and I see my JAVA_HOME entry is pointing to something different than the JDK. It's C:\Program Files\AdoptOpenJDK\jre-8.0.282.8-hotspot. Maybe you can try to download this JDK. Sep 7, 2023 at 7:23
  • Hey @PieterJacob ! Thanks for your answer, I already installed Java 17 (I was previsously using v8), When I CLI-ask for java version : "echo %JAVA_HOME% C:\Program Files\Java\jdk-17" Isn't it right ? I've to admit I've to admit it's not the first time I have difficulties with environment variables etc. Nb : I reinstalled everything on another computer, and validate the challenge. But still, I can't debug using my computer. Sep 7, 2023 at 8:42
  • 1
    in all honesty, I had not installed the JDK17 at all. But my JAVA_HOME entry was already setup to AdoptOpenJDK. Maybe you can try this one, you can download it at: adoptopenjdk.net and set it to your environment variable. You can also log a case at Salesforce if this doesn't work at help.salesforce.com. I have good experiences with this, in the sense that they respond quickly. Good luck! Sep 7, 2023 at 9:52
  • Hey again, I'm both happy and disappointed, because I just try again and... It worked. In my computer, changing nothing, not restarting VSC nor the computer. I can't understand why it didn't work yesterday, but today it's working. Thanks for your help, anyway, you rock !! Sep 7, 2023 at 10:31
  • 1
    No problem @Alexis. It might be related to caching. Something to consider if it happens again is to delete file .../.sfdx/tools/.../apex.db. See more here: developer.salesforce.com/tools/vscode/en/apex/language-server There is mentioned something about this under Reset Apex Indexing Sep 8, 2023 at 12:34

1 Answer 1

3

I had the same problem.

In my case, Clearing the Apex Language Server's indexing helped me.

To clear the Apex Language Server’s indexing, delete the following directory and restart VScode:

PROJECT_DIR/.sfdx/tools/<Salesforce Release>

In my case was this directory:

enter image description here

You can find more information here:

You must log in to answer this question.

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