Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Debugging Virtual Threads(I have a problem debugging virtual threads, and I am looking for help!)
Debugging Virtual Threads [message #1865517] Sun, 05 May 2024 17:08 Go to next message
Roland Szabó is currently offline Roland SzabóFriend
Messages: 1
Registered: May 2024
Junior Member
I have a really strange problem with the debugger. When my application uses virtual threads, they do not appear in the thread list of the debug view, but even more strangely, the do not even work when I try to debug the application!

I am not sure I can articulate this problem clearly enough, because from a few days of google searching I am alone with my problem on the internet :)

First of all, I am looking for confirmation that someone is able to debug JDK 21 Virtual Threads in Eclipse (4.31).

Re: Debugging Virtual Threads [message #1865535 is a reply to message #1865517] Mon, 06 May 2024 05:56 Go to previous message
Eitan Rosenberg is currently offline Eitan RosenbergFriend
Messages: 149
Registered: October 2018
Senior Member
Using Version: 2024-03 (4.31)
Java openjdk-22.0.1_windows-x64_bin.zip
Seems to work.



package examples;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Main {

	private static class MyRunnable implements Runnable {

		@Override
		public void run() {
			System.out.println("Hello world");
		}

	}

	public static void main(final String[] args) {
		new Main();
	}

	public Main() {

		try (ExecutorService executorService = Executors.newVirtualThreadPerTaskExecutor()) {
			executorService.submit(new MyRunnable());
		}

	}

}



index.php/fa/44265/0/

Previous Topic:"Eclipse debugger will use less precise source lookup" message
Next Topic:How to debug in local eclipse when server is in another box?
Goto Forum:
  


Current Time: Thu Jan 16 20:08:01 GMT 2025

Powered by FUDForum. Page generated in 0.03134 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top