forked from JetBrains/intellij-community
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Stream debugger redesign #6
Draft
Soarex16
wants to merge
15
commits into
master
Choose a base branch
from
breakpoint-debugger-redesign
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cherry picked from commit 1aa6bd8) Refactor all breakpoint tracer related logic Add ability to load compiled classes into target VM (cherry picked from commit d29c75f) Add errors reporting Fix value keeping (cherry picked from commit 299d39b) Add ability to intercept qualifier expression stream Unify breakpoint resolving mechanism Add draft for breakpoint based library support Replace redundant @throws annotations with doc comments (cherry picked from commit 8ad03fe) Code cleanup based on code review (cherry picked from commit a04d577) Experiments with value formatting (cherry picked from commit 4668757) Replace helper class compilation with precompiled class loading Remove runInDebuggerThread helper method because it causes misunderstanding on which thread the action will be dispatched (cherry picked from commit 06a6931) Add ability to choose stream tracing engine in registry on the fly Remove unused code Remove redundant runInEdt, because TraceStreamAction does is by itself (cherry picked from commit f512118) Refactor value manager and dependent classes to provide fresh suspend context. Move ValueContext into separate implementation Fix bug in value interception when stream chain contains multiple calls of the same stream operator Move code for disabling object collection into separate entity named ObjectStorage Move value interception logic from JavaMethodBreakpointFactory to ValueCollector Fix problem with step out Add test case for breakpoint based stream tracer Add forEach support Keep return value of called methods Remove useless comments Add more tests for breakpoint based engine Fix null pointer exception when keeping method return value from being collected by GC New stream debugger architecture prototype Make method invocation inside value manager context more convenient Better naming Fix result formatting Move Stream Debugger support lib into separate artifact Now all helper classes are built into a separate jar file, which is built during the idea compilation Proof-of-concept of method exit value sniffing (cherry picked from commit 1aa6bd8) Refactor all breakpoint tracer related logic Add ability to load compiled classes into target VM (cherry picked from commit d29c75f) Add errors reporting Fix value keeping (cherry picked from commit 299d39b) Add ability to intercept qualifier expression stream Unify breakpoint resolving mechanism Add draft for breakpoint based library support Replace redundant @throws annotations with doc comments (cherry picked from commit 8ad03fe) Code cleanup based on code review (cherry picked from commit a04d577) Experiments with value formatting (cherry picked from commit 4668757) Replace helper class compilation with precompiled class loading Remove runInDebuggerThread helper method because it causes misunderstanding on which thread the action will be dispatched (cherry picked from commit 06a6931) Add ability to choose stream tracing engine in registry on the fly Remove unused code Remove redundant runInEdt, because TraceStreamAction does is by itself (cherry picked from commit f512118) Refactor value manager and dependent classes to provide fresh suspend context. Move ValueContext into separate implementation Fix bug in value interception when stream chain contains multiple calls of the same stream operator Move code for disabling object collection into separate entity named ObjectStorage Move value interception logic from JavaMethodBreakpointFactory to ValueCollector Fix problem with step out Add test case for breakpoint based stream tracer Add forEach support Keep return value of called methods Remove useless comments Add more tests for breakpoint based engine Fix null pointer exception when keeping method return value from being collected by GC New stream debugger architecture prototype Make method invocation inside value manager context more convenient Better naming Fix result formatting Move Stream Debugger support lib into separate artifact Now all helper classes are built into a separate jar file, which is built during the idea compilation Fix firEach(Ordered) test for breakpoint based engine
Add initial library support Fix StreamDebuggerUtils class loading
…tream tracing Change breakpoint requestors behaviour, so they are able to pause execution Time ticking now optional in collectors (made for compatibility with result interpreters) Fix tests
Soarex16
force-pushed
the
breakpoint-debugger-redesign
branch
from
May 26, 2023 21:46
5e020f1
to
46f259b
Compare
… parallel streams
…from method lookup
Extract before/after formatting to separate utils class Extend call transformers interface with time parameter to be able to use time in source call transformations Fix exception with multiple step requests caused by exception handling logic Merge all collectors to UniversalCollector Add matchers to support lib
Обработка вложенных/связанных стримовUse cases:
Необходимо научить новый стрим дебаггер обрабатывать эти случаи корректно. Идеи
|
Extract addSequentialOperator to separate utils file
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should be translated to English before submiting PR to upstream.
Breakpoint-based stream debugger engine
Текущая реализация стрим дебаггера основана на генерации кода, похожего на исходный стрим, и его исполнении с помощью механизма evaluate expression.
Такой подход имеет ряд проблем:
TODO:
можно в команды дебаггера передавать колбек, который будет вызываться при исключении. То есть внутри команды у нас будет try/catch, который будет ловить все исключения из команды и пробрасывать ошибки
final int[] ints = IntStream.of(1, 2, 3, 4).toArray();
По той же причине скорее всего не работает последний стрим.