Visual Studio: Debugging Information for "java.exe" cannot be found or does not match. Cannot find or open the PDB file
<p>I encountered this error message when I tried to debug my code under Debug.
<a href="https://i.stack.imgur.com/0dIWi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0dIWi.png" alt="enter image description here"></a></p>

<p>The project is mainly composed of .h, .cpp, and JNI files wrapped inside a Java program.
I tried methods such as clean/build//rebuild, made sure using the Debug ver. instead of Release ver., rebooting OS, suppressing the message by tweaking Properties, etc. (Reference: <a href="https://stackoverflow.com/questions/2322876/debugging-information-cannot-be-found-or-does-not-match-visual-studios">link</a> and <a href="https://stackoverflow.com/questions/540536/why-cant-i-debug">link</a>) None of them worked in my case. <a href="https://stackoverflow.com/questions/15937707/error-message-cannot-find-or-open-the-pdb-file">This source</a> also suggests to ignore the error. Two questions remain for me:</p>

<p>1) The 1st link suggests </p>

<blockquote>
  <p>You don't have your pdb files being generated in the same directory as the exe</p>
</blockquote>

<p>However, my exe file is java.exe, which locates in Java/jdkx.x.x_xx/bin. I find it difficult to believe a debugger should "contaminate" a jdk directory. Does this suggestion apply to my case? Can we tell VS where to generate the pdb file?</p>

<p>2) What difference does it make if I ignore this error? Should I check "Don't show this dialog again"?</p>

<p>My appreciation to you in advance!</p>