Questions tagged [jdi]

The Java Debug Interface (JDI) is a high level Java API providing information useful for debuggers and similar systems needing access to the running state of a (usually remote) virtual machine.

The Java Debug Interface (JDI) is a high level Java API providing information useful for debuggers and similar systems needing access to the running state of a (usually remote) virtual machine. It provides information useful for debuggers and similar systems needing access to the running state of a (usually remote) virtual machine.

The JDI provides introspective access to a running virtual machine's state, Class, Array, Interface, and primitive types, and instances of those types.

The JDI also provides explicit control over a virtual machine's execution. The ability to suspend and resume threads, and to set breakpoints, watchpoints, ... Notification of exceptions, class loading, thread creation... The ability to inspect a suspended thread's state, local variables, stack backtrace...

JDI is the highest-layer of the Java Platform Debugger Architecture (JPDA). For more information on the Java Platform Debugger Architecture, see the Java Platform Debugger Architecture documentation for this release and the Java Platform Debugger Architecture website.

107 questions
0
votes
1 answer

How to know if an `com.sun.jdi.ObjectReference` is an Enum?

How to find out if an com.sun.jdi.ObjectReference instance is an enum? I can get the type of the instance with ObjectReference.type() which gives a ClassType back (if it is a class).
Nfff3
  • 321
  • 8
  • 24
0
votes
1 answer

How to hide variables from Java's JDI?

I am instrumenting some classes and introducing some new local variables. Now, when the user places a breakpoint in the code, and execution is stopped, the newly introduced local variables can be seen inside Intellij IDEA's debugger window. How can…
Nfff3
  • 321
  • 8
  • 24
0
votes
1 answer

How to set a breakpoint in Java code with instrumentation?

So, opcode 202 (1100 1010) is reserved for a breakpoint event according to the Java specification. I tried inserting a breakpoint opcode in a Java method with the help of the ASM library: targetWriter.visitInsn(202); but the JVM crashed with error…
Nfff3
  • 321
  • 8
  • 24
0
votes
1 answer

Can breakpoints be placed in JITed code in the Hotspot JVM?

I've read that that this was possible, in the (now retired) Harmony JVM, but what about the Hotspot JVM? Is this possible? If not, do breakpoints prevent the code from being JITed, which means that breakpoints come at an even greater cost?
Nfff3
  • 321
  • 8
  • 24
0
votes
1 answer

how to ignore core locator for one element

locators tree In my case i have a selector list not in a core window. For window used locator ".uni-DialogBox" but listLocator(.gwt-Label.selectbox-item__label) not in this dom [ERROR 54:49.549] : >>> NewOrderWindow.orderType…
0
votes
0 answers

Canonical way to map SourceFile class attribute to actual file system path

The SourceFile attribute only contains the file name, not a full or relative path. This is not much information to go with because javac will place the .class file in a potentially unrelated directory (relative to the -d argument), based on the…
Florian Weimer
  • 32,022
  • 3
  • 48
  • 92
0
votes
1 answer

how to use diferent properties files in JDI

Is it possible to use different settings files in JDI? For example test.properties & stage.properties and start by passing as a parameter, for example: gradle -Dtarget=stage ...
0
votes
1 answer

How to define own complex WebElement in JDI test framework

I define radioButton that there. It work if I initialize element that there But it doesn't work with @FindBy annotation. I create a constructor: public MyRadioButtons(By optionsNamesLocatorTemplate) { super(optionsNamesLocatorTemplate); …
0
votes
0 answers

explain behaviour of following StepRequest

I am running some program through StepRequest with following code. EventRequestManager mgr = vm.eventRequestManager(); StepRequest st=mgr.createStepRequest(event.thread(),StepRequest.STEP_LINE,StepRequest.STEP_OVER); …
rainyday
  • 353
  • 3
  • 17
0
votes
1 answer

StepRequest with StepRequest.STEP_MIN parameter

In Java Debug Interface, What does StepRequest with StepRequest.STEP_MIN parameter mean ? https://docs.oracle.com/javase/7/docs/jdk/api/jpda/jdi/com/sun/jdi/request/StepRequest.html Java Docs says "Step to the next available location". What is next…
rainyday
  • 353
  • 3
  • 17
0
votes
0 answers

Is it possible to instrument Object class by JDI?

I'm trying to create some instrumentation tool. I want to track each object allocation. The simplest idea that came to my mind was to retransform Object constructor as each object calls it (I know that arrays are initialized differently). I tried…
0
votes
1 answer

Is it possible to modify behavior of stepOver() in JDIStackFrame?

There are not many extension points available to customize the default debug behavior of Eclipse JDT (https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Freference%2Fextension-points%2Findex.html). I need a way to decide based…
AceTheFace
  • 137
  • 4
0
votes
2 answers

Java debugger interface (JDI) - How to set a breakpoint

I am asking because I am unable to find anything using Google. I want to debug org.Example. I want to set an breakpoint and then resume the VM to execute till the breakpoint. org.Example is just a dummy main function. So I do have my VM, but I…
Florian Reisinger
  • 2,638
  • 4
  • 23
  • 34
0
votes
1 answer

Java JDI casting to actual real type

I am just starting to figure out JDI a little bit for creating a custom debugger. I have been trying to convert reference objects into real objects, so I can access their fields or methods without using invoke. I include the jar into the project…
Silas
  • 201
  • 4
  • 16
0
votes
0 answers

java debug interface:get value of ObjectReference

Exception in thread "main" java.lang.IllegalArgumentException: Attempt to use non-static field with ReferenceType i trace the code which like below: if(!var5.isStatic()) { throw new IllegalArgumentException("Attempt to use non-static…
paxi
  • 21
  • 1
  • 5