Comments (5)
This is a bug we must fix in 0.1.0
from java-debug.
I've found the root cause. It's a JDT bug.
When calling request.enable()
, it constructs the command bytes, and sends to VM. The differences are as:
bytes(4100018xy) <--- this causes error
bytes(410001800000000xy) <--- this is ok
'x' controls caught exceptions
'y' controls uncaught exceptions
In command bytes construction, look at
org.eclipse.jdi.internal.request.EventRequestImpl
@Override
public synchronized void enable() {
......
writeModifiers(outData); <--- here it construct command bytes.
JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.ER_SET,
outBytes); <--- here it send the command.
defaultReplyErrorHandler(replyPacket.errorCode()); <--- here it parses the error code.
......
}
In calling writeModifiers(outData)
, there a part writing JdwpID:
/**
* Writes ID.
*/
public void write(DataOutputStream outStream) throws IOException {
int size = getSize(); <--- vm.fReferenceTypeIDSize, should be 8, but is 0.
for (int i = size - 1; i >= 0; i--) {
byte b = (byte) (fValue >>> 8 * i);
outStream.write(b);
}
}
However, vm.fReferenceTypeIDSize
is set to default value 0
. vm.fGotIDSizes
is false
, meaning that vm.getIDSizes()
has not been called yet.
from java-debug.
there're many solutions, PR #25 works well, but not easy to understand. I'm looking for a more elegant one.
from java-debug.
Since fReferenceTypeIDSize
is only modified in getIDSizes()
, as shown in the call hierarchy, we now can only fix it via sending another command calling requestVM
.
from java-debug.
fixed by call vm.version()
after launching the vm.
from java-debug.
Related Issues (20)
- This repo is missing important files
- Breakpoint doesn't work on lambdas which returns a generic type HOT 1
- [major] [bug] Gradle projects add test compile path in the launcher configuration HOT 5
- Documentation | How can I launch the DAP server from the command line? HOT 1
- Typo findMethodLocation instead of findMethodLocaiton HOT 1
- i cant debug java core classes HOT 1
- Missing very recent dependency fails build process HOT 2
- StepInto method target doesn't work if the method is part of wrapped expression
- [Critical] Cannot debug multiline nested method expression's lambda statements
- Are there any plans for 0.50 release? HOT 3
- CompletionItem of completions response always have `start = 0` and text prefix inclusion is mixed HOT 1
- Dependency location causing build errors
- [critical] Improve lambda breakpoints when using gradle build server HOT 2
- Build failure: TypeFilter cannot be resolved to a type HOT 4
- Remote eclipse binary repository removed HOT 1
- Install fails HOT 6
- Building fails with unprovided dependency HOT 1
- Standardize Documentation Across All Formatters for Clarity and Consistency
- [Question]How to send the "vscode.java.startDebugSession" command to jdt.ls HOT 1
- java.lang.UnsupportedClassVersionError
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-debug.