In the past you could tell the nodes in a test cluster to attach themselves to a waiting debugger on startup by passing the `--debug-server-jvm` option documented here:

https://github.com/elastic/elasticsearch/blob/c0228c73fea5caf279bf7141eabea50813c4528b/TESTING.asciidoc#L383-L390

I think this changed in #92379 and no longer seems to work. In fact I really wanted to attach a debugger to just one of the nodes in the cluster, and I believe #92379 might make this much easier to use (e.g. maybe via a method `LocalNodeSpecBuilder#debuggerPort(int)`). That'd be even better.
build-tools/src/main/java/org/elasticsearch/gradle/testclusters/StandaloneRestIntegTestTask.java
@Override
    public Collection<ElasticsearchCluster> getClusters() {
        return clusters;
    }
    @Override
    @Internal
    public List<ResourceLock> getSharedResources() {
        List<ResourceLock> locks = new ArrayList<>(super.getSharedResources());
        BuildServiceRegistryInternal serviceRegistry = getServices().get(BuildServiceRegistryInternal.class);
        Provider<TestClustersThrottle> throttleProvider = GradleUtils.getBuildService(serviceRegistry, THROTTLE_SERVICE_NAME);
        SharedResource resource = serviceRegistry.forService(throttleProvider);
        int nodeCount = clusters.stream().mapToInt(cluster -> cluster.getNodes().size()).sum();
        if (nodeCount > 0) {
            for (int i = 0; i < Math.min(nodeCount, resource.getMaxUsages()); i++) {
                locks.add(resource.getResourceLock());
            }
        }
        return Collections.unmodifiableList(locks);
    }
    public WorkResult delete(Object... objects) {
        return getFileSystemOperations().delete(d -> d.delete(objects));
    }
    @Override
    public void beforeStart() {
        if (debugServer) {
            enableDebug();
        }
    }
}