You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/08/16 08:13:52 UTC

[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #3080: Attach to a running Native Image.

JaroslavTulach commented on a change in pull request #3080:
URL: https://github.com/apache/netbeans/pull/3080#discussion_r689325169



##########
File path: ide/nativeimage.api/src/org/netbeans/modules/nativeimage/api/debug/NIDebugger.java
##########
@@ -113,6 +113,20 @@ public void removeBreakpoint(Object id) {
         return provider.start(command, workingDirectory, debugger, displayName, executionDescriptor, startedEngine);
     }
 
+    /**
+     * Attach to a process and create a debugging session. Call this typically after breakpoints are added.
+     *
+     * @param executablePath path to an executable representing the native image
+     * @param processId a process to attach to
+     * @param debugger the native debugger command
+     * @param startedEngine the corresponding DebuggerEngine is passed to this consumer
+     * @return future that completes on the execution finish
+     * @since 0.4
+     */
+    public CompletableFuture<Void> attach(String executablePath, long processId, String debugger, Consumer<DebuggerEngine> startedEngine) {

Review comment:
       Wouldn't it be better to return `CompletionStage<DebuggerEngine>` and remove the 4th parameter? Probably not, as the `Consumer<DebuggerEngine>` is called way sooner than the `CompletableFuture<Void>` is set, rigth?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists