Skip to content

Auto resume trigger breakpoints once hit#620

Merged
iloveeclipse merged 1 commit intoeclipse-jdt:masterfrom
SougandhS:NonBreakingTriggerPoints
Apr 15, 2025
Merged

Auto resume trigger breakpoints once hit#620
iloveeclipse merged 1 commit intoeclipse-jdt:masterfrom
SougandhS:NonBreakingTriggerPoints

Conversation

@SougandhS
Copy link
Copy Markdown
Member

@SougandhS SougandhS commented Feb 20, 2025

This PR introduces an option to resume the virtual machine execution once a trigger breakpoint is hit. This allows trigger breakpoints to act as barriers for other breakpoints, enabling less priority breakpoints to remain active without requiring them to be disabled.

Screens -
Plain

Once trigger is enabled then users will be able to choose 'Resume' , Selecting 'Resume' will also include 'Ignored' tag to breakpoint label
enabled

On debugging trigger wont suspend at breakpoint line, it will only suspend on next breakpoint


Fixes #614

What it does

How to test

Author checklist

@SougandhS SougandhS force-pushed the NonBreakingTriggerPoints branch from 1c4768d to a4737ab Compare February 20, 2025 08:38
@SougandhS
Copy link
Copy Markdown
Member Author

Hi @jukzi , could you pls check this when you have time..

@SougandhS SougandhS added the enhancement New feature or request label Feb 20, 2025
@SougandhS SougandhS force-pushed the NonBreakingTriggerPoints branch 4 times, most recently from 62b4f94 to 3af58fc Compare February 20, 2025 09:30
@jukzi
Copy link
Copy Markdown
Contributor

jukzi commented Feb 20, 2025

Hi @jukzi , could you pls check this when you have time..

Code looks fine. I am testing it, thanks for working on that!! And congrats to your Election.

@jukzi jukzi added the noteworthy Noteworthy feature label Feb 20, 2025
@SougandhS
Copy link
Copy Markdown
Member Author

Code looks fine. I am testing it, thanks for working on that!! And congrats to your Election.

Thank you so much @jukzi 😇👏

@jukzi
Copy link
Copy Markdown
Contributor

jukzi commented Feb 20, 2025

It works almost like i wished it would.
I see a single unexpected behaviour:
Lets have a Resume point with a Condition. When i edit the Condition the Breakpoint disables its "Resume" behavior back to single thread (may be an existing bug):
image
image

Also i would like to see a "Toggle Trigger Point" in the context menu, which would "Resume" by default (debatable) :
image

Comment thread org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaBreakpoint.java Outdated
jukzi
jukzi previously requested changes Feb 20, 2025
Copy link
Copy Markdown
Contributor

@jukzi jukzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix API error

@SougandhS
Copy link
Copy Markdown
Member Author

When i edit the Condition the Breakpoint disables its "Resume" behavior back to single thread

Will check this

Also i would like to see a "Toggle Trigger Point" in the context menu, which would "Resume" by default (debatable) :

Sure 👍

@SougandhS SougandhS force-pushed the NonBreakingTriggerPoints branch from 3af58fc to 6f042e2 Compare February 24, 2025 07:56
@SougandhS
Copy link
Copy Markdown
Member Author

Added additional handling for conditional-resume-triggerpoints

Once resume is enabled, resume based labels will be shown for condition options

Screenshot 2025-02-24 at 1 27 24 PM

Added toggling Trigger points from context menu (by default it will be Resume-Triggers)

image

@SougandhS SougandhS requested a review from jukzi February 24, 2025 08:24
@jukzi
Copy link
Copy Markdown
Contributor

jukzi commented Feb 24, 2025

Take this example:

package p1;

public class TestResume {
public static void main(String[] args) throws InterruptedException {
	System.out.println("main");
	Thread thread = new Thread(TestResume::runAsync);
	thread.start(); // add Triggerpoint with condition=false
	thread.join();
}
public static void runAsync() {
	System.out.println("async"); // add breakpint
}
}

and add the breakpoint as in the comments:
image

I found two problems:
Error 1: The Triggerpoint stops the program (should not happen, its a Triggerpoint, not a Breakpoint)
Error 2: The program never ends - even if i press Resume(F8). Thats fatal

@SougandhS SougandhS force-pushed the NonBreakingTriggerPoints branch from 6f042e2 to c47e110 Compare February 25, 2025 02:52
@SougandhS
Copy link
Copy Markdown
Member Author

Take this example:

thanks for this example

Error 1: The Triggerpoint stops the program (should not happen, its a Triggerpoint, not a Breakpoint)
Error 2: The program never ends - even if i press Resume(F8). Thats fatal

fixed both now 👍

@SougandhS SougandhS force-pushed the NonBreakingTriggerPoints branch from c47e110 to 6d2d70a Compare March 5, 2025 04:58
@eclipse-jdt-bot
Copy link
Copy Markdown
Contributor

eclipse-jdt-bot commented Mar 5, 2025

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF
org.eclipse.jdt.debug.tests/pom.xml

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 6409f8203d15eb1458642bfe1cec071bcfc7274a Mon Sep 17 00:00:00 2001
From: Eclipse JDT Bot <jdt-bot@eclipse.org>
Date: Wed, 5 Mar 2025 07:42:23 +0000
Subject: [PATCH] Version bump(s) for 4.36 stream


diff --git a/org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF b/org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF
index 3209a2c62..0fd3030ca 100644
--- a/org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.debug.tests; singleton:=true
-Bundle-Version: 3.12.600.qualifier
+Bundle-Version: 3.12.700.qualifier
 Bundle-ClassPath: javadebugtests.jar
 Bundle-Activator: org.eclipse.jdt.debug.testplugin.JavaTestPlugin
 Bundle-Vendor: %providerName
diff --git a/org.eclipse.jdt.debug.tests/pom.xml b/org.eclipse.jdt.debug.tests/pom.xml
index 8c423e4b8..e7d8cab78 100644
--- a/org.eclipse.jdt.debug.tests/pom.xml
+++ b/org.eclipse.jdt.debug.tests/pom.xml
@@ -18,7 +18,7 @@
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.debug.tests</artifactId>
-  <version>3.12.600-SNAPSHOT</version>
+  <version>3.12.700-SNAPSHOT</version>
   <packaging>eclipse-test-plugin</packaging>
   <properties>
     <testSuite>${project.artifactId}</testSuite>
-- 
2.48.1

Further information are available in Common Build Issues - Missing version increments.

@SougandhS SougandhS force-pushed the NonBreakingTriggerPoints branch 7 times, most recently from 581ef33 to f0a5b97 Compare March 5, 2025 07:40
@SougandhS SougandhS force-pushed the NonBreakingTriggerPoints branch from f2eb16c to 49ba29a Compare March 27, 2025 09:36
@SougandhS SougandhS force-pushed the NonBreakingTriggerPoints branch 5 times, most recently from 0054511 to d0ede10 Compare March 28, 2025 11:07
Comment thread org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaBreakpoint.java Outdated
@SougandhS SougandhS force-pushed the NonBreakingTriggerPoints branch 7 times, most recently from 1d90338 to 215cd0d Compare April 2, 2025 01:14
@SougandhS SougandhS force-pushed the NonBreakingTriggerPoints branch 2 times, most recently from 069ba18 to 9e2f237 Compare April 9, 2025 06:39
@SougandhS SougandhS requested a review from iloveeclipse April 9, 2025 07:40
@SougandhS SougandhS force-pushed the NonBreakingTriggerPoints branch from 9e2f237 to d37b835 Compare April 13, 2025 05:11
@SougandhS
Copy link
Copy Markdown
Member Author

hi @iloveeclipse , Made all the changes suggested

Copy link
Copy Markdown
Member

@iloveeclipse iloveeclipse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had some comments and changes, I will push them now.

This commit introduces an option to resume virtual machine execution
when a trigger breakpoint is hit. This allows trigger breakpoints to act
as barriers, enabling lower-priority breakpoints to remain active
without needing to be disabled.

Fixes eclipse-jdt#614
@iloveeclipse iloveeclipse force-pushed the NonBreakingTriggerPoints branch from d37b835 to 3859908 Compare April 15, 2025 16:39
@iloveeclipse iloveeclipse merged commit 3771b55 into eclipse-jdt:master Apr 15, 2025
11 checks passed
@iloveeclipse
Copy link
Copy Markdown
Member

@SougandhS : please provide N&N entry.

@SougandhS
Copy link
Copy Markdown
Member Author

Thank you @iloveeclipse :)

@SougandhS : please provide N&N entry.

Will provide N & N 👍

@iloveeclipse iloveeclipse added this to the 4.36 M2 milestone Apr 16, 2025
SougandhS added a commit to SougandhS/www.eclipse.org-eclipse that referenced this pull request Apr 16, 2025
This commit includes N & N entry for a brand new feature in JDT debug PR
: eclipse-jdt/eclipse.jdt.debug#620
merks pushed a commit to eclipse-platform/www.eclipse.org-eclipse that referenced this pull request Apr 16, 2025
This commit includes N & N entry for a brand new feature in JDT debug PR
: eclipse-jdt/eclipse.jdt.debug#620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request noteworthy Noteworthy feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Trigger Points that do not suspend anything

4 participants