entlicher commented on a change in pull request #2964:
URL: https://github.com/apache/netbeans/pull/2964#discussion_r636772558



##########
File path: 
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java
##########
@@ -200,30 +201,43 @@ public void progressHandleCreated(ProgressOperationEvent 
e) {
             List<String> args = argsToStringList(launchArguments.get("args"));
             if (debug) {
                 requestProcessor.post(() -> {
-                    Lookups.executeWith(launchCtx, () -> {
+                    ActionProgress debugProgress = 
ActionProgress.start(launchCtx);
+                    // Add session's lookup, it may override dialog displayer, 
etc.
+                    Lookups.executeWith(new ProxyLookup(launchCtx, 
context.getLspSession().getLookup()), () -> {
                         String miDebugger = (String) 
launchArguments.get("miDebugger");
-                        startNativeDebug(nativeImageFile, args, miDebugger, 
context, executionDescriptor, launchFuture);
+                        startNativeDebug(nativeImageFile, args, miDebugger, 
context, executionDescriptor, launchFuture, debugProgress);
                     });
                 });
             } else {
+                AtomicReference<Future<Integer>> run = new AtomicReference<>();
                 Lookups.executeWith(launchCtx, () -> {
-                    execNative(nativeImageFile, args, context, 
executionDescriptor, launchFuture);//, success);
+                    run.set(execNative(nativeImageFile, args, context, 
executionDescriptor, launchFuture));
+                });
+                new RequestProcessor().post(() -> {
+                    Integer ret;

Review comment:
       That significantly simplified the code, thanks.
   And it uncovered a bug in cpplite debugger - the GDB process did not finish 
after application exit. This is fixed, including a test, as well.




-- 
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.

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

Reply via email to