Reputation:
How to debug the JNI code in VisualStudio 2003 without using eclipse?
Upvotes: 1
Views: 2180
Reputation: 24341
You've got two options:
Upvotes: 1
Reputation: 12257
Start your application and let your application wait for a user action (dialog or something). Open VS and go to (in German) "Debuggen" (Debugging) -> "Prozesse" (Processes) Their you will see the javaw.exe
Select the javaw.exe and and press "Anfügen" (Attach)
Let your java application run.
When i remeber, the code page in c++ wher the breakpoint is placed has to be open in VS. VS will not open the page when the breakpoint is hit automaticaly. When the dll is loaded and the code line where you put a breakpoint is executed, the debugger in VS will stop at this position. Notice: this will only happen, when you compile the dll you want to debug in with debug options!!! otherwise the debugger will not stop at the C++ breakpoint.
I did this half a year ago, but this should be the right steps.
It hope you get it.
Upvotes: 2
Reputation: 94645
http://www.velocityreviews.com/forums/t152740-jni-debugger.html
SUMMARY: Basically, the idea is that you start your Java program under Eclipse, and then tell VC to attach to the running process too.
Upvotes: 2