How to debug through Java code and JNI with native code in c or c++ ?

J

jin zhang

I am trying to debug a system writen by java and C++ code.
They are connected by JNI of java.
I am using the visual studio .net to do the project.
The entry of the program is in java part, and I believe that the bug
code is in C++.
Are there anyway to debug this thing without writing a individual
running file for the c code?
Thank you very much.
 
C

Chris Uppal

jin said:
The entry of the program is in java part, and I believe that the bug
code is in C++.
Are there anyway to debug this thing without writing a individual
running file for the c code?

Yes, VS allows you to debug DLLs that have been loaded by an external
application. From VS's point of view, java.exe is just another program that
loads the DLL you create with your JNI code, so you tell it that you want to
debug your DLL, and that it is going to be executed by the external program
<wherever>\java.exe.

See the VS help for details (try searching for "debugging DLLs").

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top