Debugging AnyCPU requires a 64-bit JDK on 64-bit OS
Opened this issue · 0 comments
Currently, if you attempt to debug an application on a 64-bit OS use the Any CPU solution platform, and you only have a 32-bit JDK installed, the debugging operation will flash a window on the screen and then stop.
The problem stems from the fact that the debug launch algorithm automatically detects the appropriate version of the JDK to use (which may be a 32-bit JDK in this case), but does not then make sure and match the correct debug agent with the chosen runtime. In other words, when you try to debug this scenario, the Tvl.Java.DebugHostWrapperX64.dll agent is used with a 32-bit JDK.
The following workarounds are currently available:
- Use the X86 solution platform instead of Any CPU.
- Install a 64-bit JDK if you have a 64-bit operating system.
The debug agent filename is currently chosen by the following code:
JavaForVS/Tvl.VisualStudio.Language.Java/Project/JavaProjectConfig.cs
Lines 153 to 156 in 67f594a