-
Notifications
You must be signed in to change notification settings - Fork 173
Add support for StepInTarget request #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b485dd8
to
eed4b3a
Compare
@testforstephen WDYT ? specially on the target label, I will also see if i can add some tests. I really miss adding integration tests like in Eclipse JDT projects. may be we should spend some time to see if there is a possibility to do that. any reason we split the UI and LS parts in to separate repo ? |
I will try to find some time to review this PR as soon as possible.
No special reason, just we chose two repos at day 1. Yes, integration tests are the missing engineering debt, and we will eventually resolve this technical debt at some day. Since the debugger is request-response based, one rough idea is we could write a mock client on Java side, and use it to simulate the behavior of VS Code to send DAP requests and verify how the debugger responds. |
I think i need to handle unloaded classes as well which I will look when I get time. |
e3fab20
to
eb86092
Compare
eb86092
to
4feb9e9
Compare
@testforstephen i fixed the conflicts and adapt to new changes, let me know what you think ? |
Yes, this PR is on my plan list of Sep. |
4feb9e9
to
1a1ac07
Compare
Had a try on this PR, it threw NPE.
|
@testforstephen will check it next week. seems like after merging the async support something is off. |
@testforstephen I manage to fix the issues with cause not to step in to any method at all after synching with master, But i think still it will only work with concrete methods. Any method that is overridden or any dynamic receiver type like List.stream will not work unless we first try to resolve expression to find the actual receiver at runtime. I will check how we do this in JDT Debug and may be it would be good to see if that can be leverage to support headless through jdt core. |
Recently I'm working on improving inline breakpoint user experience, and haven't looked into StepInTarget deeply yet. |
The change implement the StepInTarget request and also update the StepRequestHandler to support StepInTarget as well.
Improve to only show valid targets within an expression, also added support for stepin into unloaded classes by delaying the stepin.
1a1ac07
to
b00f6b3
Compare
@gayanper I have fixed all issues I known based on your branch. Feel free to have a try.
|
...src/main/java/com/microsoft/java/debug/core/adapter/handler/StepInTargetsRequestHandler.java
Outdated
Show resolved
Hide resolved
@testforstephen LGTM, may be the caching AST can be moved for reuse later in other places as well if needed. But for now the change looks good even with out it. I think you have made some good improvements over my initial changes. |
I tried to run your changes with the following code
But on both the stream expression and the other expression it says no targets available. |
It works for me. With the latest changes, you can hover on the target method name and then click "Step Into Target" menu. stepInTarget.mp4Maybe your extesnion cache is still using the old debug jar. I packaged a private bits with the latest changes, you can have a try on it. https://github.com/testforstephen/vscode-test/raw/master/vscode-java-debug-0.45.1.vsix |
b00f6b3
to
bebc3d2
Compare
Sorry couldn’t post the results yesterday, it was working as expected. Thanks for completing the feature jinbo |
It's a good feature, I'm happy to merge it. It has been in pre-release version of debugger extension. Thank you for the initial contribution. |
The change implement the StepInTarget request and also update the
StepRequestHandler to support StepInTarget as well.