jdi

build a simple debugger with jdi to set breakpoints and retrieve the value of a variable

≯℡__Kan透↙ 提交于 2019-11-29 12:50:41
I am looking to build a debugger using java debug interface . My objective is to set a breakpoint and get the value of a variable. I found this answer close to what i am looking for, I understand that i have to use the following interfaces :- VirtualMachineManager , LaunchingConnector , ClassPrepareEvent , ClassPrepareRequest . But I cant figure out, how to set a breakpoint at a particular line and get the value of a variable or in what order should the interfaces be used. For example in the code below, how do i proceed to run it with jdi such that i get the value of the variable S import java

build a simple debugger with jdi to set breakpoints and retrieve the value of a variable

℡╲_俬逩灬. 提交于 2019-11-28 10:28:43
问题 I am looking to build a debugger using java debug interface. My objective is to set a breakpoint and get the value of a variable. I found this answer close to what i am looking for, I understand that i have to use the following interfaces :- VirtualMachineManager , LaunchingConnector , ClassPrepareEvent , ClassPrepareRequest . But I cant figure out, how to set a breakpoint at a particular line and get the value of a variable or in what order should the interfaces be used. For example in the

Can Ant launch two java applications concurrently?

会有一股神秘感。 提交于 2019-11-27 15:48:33
I am currently developing a "debugger" java application that uses JDI to connect to an already running "target" java application. Is there any way to have Ant launch my target application then launch my "debugger" afterwards, while the first application is still running? Yes I know that I can develop the JDI app to launch the target program, but that is not what I want right now. Mark O'Connor You can spawn two java programs from within an Ant parallel task. <parallel> <sequential> <java fork="true" classname="prog1 .... > </sequential> <sequential> <sleep seconds="30"/> <java fork="true"

Why does the debugged program slow down so much when using method entry debugging?

点点圈 提交于 2019-11-27 08:13:42
I'm using jdi interfaces to create a debugger and when I use MethodEntryRequests to enable method entry tracing the debugged program slows down by factor of tens. I have set filter for main thread and suspend policy to SUSPEND_EVENT_THREAD. Classfilter is limited and if I print any received events it doesn't show more than couple of dozen of those so it shouldn't receive too much of them. I'm debugging locally and having followind kind of command-line with the debugged java program: -Xdebug -Xrunjdwp:transport=dt_socket,suspend=y,server=y,address=1337 Ichorus The short answer is that execution

Can Ant launch two java applications concurrently?

冷暖自知 提交于 2019-11-26 17:18:07
问题 I am currently developing a "debugger" java application that uses JDI to connect to an already running "target" java application. Is there any way to have Ant launch my target application then launch my "debugger" afterwards, while the first application is still running? Yes I know that I can develop the JDI app to launch the target program, but that is not what I want right now. 回答1: You can spawn two java programs from within an Ant parallel task. <parallel> <sequential> <java fork="true"

Why does the debugged program slow down so much when using method entry debugging?

前提是你 提交于 2019-11-26 14:05:05
问题 I'm using jdi interfaces to create a debugger and when I use MethodEntryRequests to enable method entry tracing the debugged program slows down by factor of tens. I have set filter for main thread and suspend policy to SUSPEND_EVENT_THREAD. Classfilter is limited and if I print any received events it doesn't show more than couple of dozen of those so it shouldn't receive too much of them. I'm debugging locally and having followind kind of command-line with the debugged java program: -Xdebug