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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists