Closed jukzi closed 6 months ago
It looks like timing issue. New process is created for adding the label.
label is computed in org.eclipse.debug.internal.ui.views.console.ProcessConsole.computeName()
a LaunchManager.CHANGED event is created just before the remaining attributes are set in org.eclipse.jdt.internal.launching.StandardVMRunner.run(VMRunnerConfiguration, ILaunch, IProgressMonitor):549 Those attributes are signalled by DebugEvent.CHANGE, but those events are only received after addDebugEventListener
Thread [Worker-18: Launching A] (Suspended (breakpoint at line 201 in org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager))
org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager.launchChanged(org.eclipse.debug.core.ILaunch) line: 201
org.eclipse.debug.internal.core.LaunchManager$LaunchNotifier.run() line: 427
org.eclipse.core.runtime.SafeRunner.run(org.eclipse.core.runtime.ISafeRunnable) line: 47
org.eclipse.debug.internal.core.LaunchManager$LaunchNotifier.notify(org.eclipse.debug.core.ILaunch, int) line: 410
org.eclipse.debug.internal.core.LaunchManager.fireUpdate(org.eclipse.debug.core.ILaunch, int) line: 920
org.eclipse.debug.core.Launch.fireChanged() line: 467
org.eclipse.debug.core.Launch.addProcess(org.eclipse.debug.core.model.IProcess) line: 421
org.eclipse.debug.core.model.RuntimeProcess.<init>(org.eclipse.debug.core.ILaunch, java.lang.Process, java.lang.String, java.util.Map<java.lang.String,java.lang.String>) line: 166
org.eclipse.debug.core.DebugPlugin.newProcess(org.eclipse.debug.core.ILaunch, java.lang.Process, java.lang.String, java.util.Map<java.lang.String,java.lang.String>) line: 869
org.eclipse.jdt.internal.launching.StandardVMRunner(org.eclipse.jdt.launching.AbstractVMRunner).newProcess(org.eclipse.debug.core.ILaunch, java.lang.Process, java.lang.String, java.util.Map<java.lang.String,java.lang.String>) line: 169
org.eclipse.jdt.internal.launching.StandardVMRunner.run(org.eclipse.jdt.launching.VMRunnerConfiguration, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor) line: 549
org.eclipse.jdt.launching.sourcelookup.advanced.AdvancedJavaLaunchDelegate(org.eclipse.jdt.launching.JavaLaunchDelegate).launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor) line: 176
org.eclipse.debug.internal.core.LaunchConfiguration.launch(java.lang.String, org.eclipse.core.runtime.IProgressMonitor, boolean, boolean) line: 805
org.eclipse.debug.internal.core.LaunchConfiguration.launch(java.lang.String, org.eclipse.core.runtime.IProgressMonitor, boolean) line: 716
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor) line: 1038
org.eclipse.debug.internal.ui.DebugUIPlugin$1.run(org.eclipse.core.runtime.IProgressMonitor) line: 1241
org.eclipse.core.internal.jobs.Worker.run() line: 63
sometimes when started the first time: does not show JRE nor start time :-(
terminated: shows JRE :-)
started another time: shows JRE :-)
![image](https://github.com/eclipse-jdt/eclipse.jdt.debug/assets/51790620/0eac6e36-f1ad-4dd5-bdd1-f0e52c4e0a8c)
I could not see a deterministic pattern when it happens.