Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some way to pin a Debug Inspect window #1905

Closed
2 tasks done
mickaelistria opened this issue May 31, 2024 · 17 comments · Fixed by #1906
Closed
2 tasks done

Some way to pin a Debug Inspect window #1905

mickaelistria opened this issue May 31, 2024 · 17 comments · Fixed by #1906
Labels
enhancement New feature or request

Comments

@mickaelistria
Copy link
Contributor

Let's make sure issue is not already fixed in latest builds first.

Suggestion

I want to compare some inspected (select in code then right-lick > Inspect) value in 2 distinct executions I'm debugging.
Currently, whenever I click out of the 1st inspect window to try to open a second one (which involves switching target in the debug view, going to the other file, selecting the expression then right-click > Evaluate), the 1st inspect window gets closed and I cannot efficiently compare.

It would be extremely convenient to have an option on the Inspect window to "pin" it so that it doesn't close on focus out, and it just closes when users wants to close it.

Community

  • I understand suggesting an enhancement doesn't mandate anyone to implement it. Other contributors may consider this suggestion, or not, at their own convenience. The most efficient way to get it fixed is that I implement it myself and contribute it back as a good quality patch to the project.
@mickaelistria mickaelistria added the enhancement New feature or request label May 31, 2024
@mickaelistria mickaelistria changed the title Some way to [in a Debug Inspect window Some way to pin a Debug Inspect window May 31, 2024
@laeubi
Copy link
Contributor

laeubi commented May 31, 2024

@mickaelistria can you share a screenshot / cast? I can hardly follow the description mostly as I seldom use your described workflow.

@jukzi
Copy link
Contributor

jukzi commented May 31, 2024

You can use the Expressions View instead of Inspect.

@mickaelistria
Copy link
Contributor Author

You can use the Expressions View instead of Inspect.

that doesn't work with "2 distinct executions" (which is the most important part of the workflow), as switching to another StackFrame updates the values. I basically want a way to be able to see some values from 2 distinct stack frames, without having to have 2 distinct workbench windows.
Another similar story (harder and maybe not as powerful) was eclipse-platform/eclipse.platform#531

@jukzi
Copy link
Contributor

jukzi commented May 31, 2024

If it is 2 different debugees you could use 2 distinct workspaces.
For comparing results of of different threads within same debugee i don't know a solution and help myself with screenshots. So i could use that feature too, but i have no idea how it could be intuitivly visualised which values belong to which stackframe.

@mickaelistria
Copy link
Contributor Author

If it is 2 different debugees you could use 2 distinct workspaces.

When in desperate need, I use 2 workbench windows (Window > New Window) which can allow to have different stackframes selected in each window and update all the context. It's really powerful, but it's not so easy to use and it often seems overkill to quickly compare 2 values.

A first idea would be to augment the Inspect popop with 2 new actions (Pin/Close) in its action menu:

Screenshot from 2024-05-31 11-54-04

So it would look like

  • Move
  • Resize
  • Pin
  • Close

@jukzi
Copy link
Contributor

jukzi commented May 31, 2024

But how could the user know which Window belongs to which frame?

@mickaelistria
Copy link
Contributor Author

But how could the user know which Window belongs to which frame?

in a 1st iteration, I think it could be up to them to remember, as it's not (yet?) a very common workflow,.
But yes, later on we should consider adding some information to the dialog to show the context in which one it got evaluated. I wouldn't just make it a blocker right now.

@jukzi
Copy link
Contributor

jukzi commented May 31, 2024

Things that need later to be done are a blocker for me, as otherwise they are usually not done.

@mickaelistria
Copy link
Contributor Author

It seems like we could implement it in PopupDialog, so it could also help some other stories.

@iloveeclipse
Copy link
Member

It seems like we could implement it in PopupDialog, so it could also help some other stories.

I doubt having N pinned dialogs is "the" solution here.

I personally never use this functionality, but if I would use it in the way you do, I would probably just want to "move" current popup content to Expressions view and there provide a way to "pin" expressions to threads/frames, as long as they run/exist.

@mickaelistria
Copy link
Contributor Author

I personally never use this functionality, but if I would use it in the way you do, I would probably just want to "move" current popup content to Expressions view and there provide a way to "pin" expressions to threads/frames, as long as they run/exist.

I think it's more or less what I suggested in eclipse-platform/eclipse.platform#531

@iloveeclipse
Copy link
Member

I think it's more or less what I suggested in eclipse-platform/eclipse.platform#531

Probally I can't understand the use case, but you proposeda "diff" view and here you want persistent per frame inspection values?

@mickaelistria
Copy link
Contributor Author

you proposeda "diff" view

No, in the other issue, I propose that we can show values from multiple sources in the Variable/Expressions view (I'm against yet-another-view), adding them as colums.

here you want persistent per frame inspection values?

Yes, I just want to be able to look at 2 inspected expressions, from whichever source, simultaneously. And this is currently only possible without 2 distinct workbench window.

@mickaelistria
Copy link
Contributor Author

I've managed to add the menu entries and so on, but pinning seems more deeply rooted than I thought. Here is the stack that shows the dialog closing when an external event happens. I was hoping for some listener to tweak in PopupDialog, but it seems deeper

Thread [main] (Suspended (entry into method close in PopupDialog))	
	QuickAccessDialog(PopupDialog).close() line: 1114	
	QuickAccessDialog.close() line: 306	
	QuickAccessDialog(Window).handleShellCloseEvent() line: 739	
	Window$1.shellClosed(ShellEvent) line: 685	
	TypedListener.handleEvent(Event) line: 115	
	EventTable.sendEvent(Event) line: 91	
	Display.sendEvent(EventTable, Event) line: 5855	
	Shell(Widget).sendEvent(Event) line: 1617	
	Shell(Widget).sendEvent(int, Event, boolean) line: 1643	
	Shell(Widget).sendEvent(int, Event) line: 1626	
	Shell.closeWidget() line: 711	
	Shell.close() line: 707	
	Shell.traverseEscape() line: 3144	
	Shell(Control).traverse(Event) line: 6667	
	Text(Control).translateTraversal(long) line: 6640	
	Text.translateTraversal(long) line: 2896	
	Text(Control).gtk_key_press_event(long, long) line: 3996	
	Text.gtk_key_press_event(long, long) line: 1886	
	Text(Widget).windowProc(long, long, long) line: 2595	
	Text(Control).windowProc(long, long, long) line: 6833	
	Text.windowProc(long, long, long) line: 2992	
	Display.windowProc(long, long, long) line: 6162	
	GTK3.gtk_main_do_event(long) line: not available [native method]	
	Display.eventProc(long, long) line: 1598	
	GTK3.gtk_main_iteration_do(boolean) line: not available [native method]	
	Display.readAndDispatch() line: 4514	
	PartRenderingEngine$5.run() line: 1151	
	Realm.runWithDefault(Realm, Runnable) line: 339	
	PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 1042	
	E4Workbench.createAndRunUI(MApplicationElement) line: 152	
	Workbench.lambda$3(Display, WorkbenchAdvisor, int[]) line: 639	
	0x00000000a629ed20.run() line: not available	
	Realm.runWithDefault(Realm, Runnable) line: 339	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 546	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 173	
	IDEApplication.start(IApplicationContext) line: 152	
	EclipseAppHandle.run(Object) line: 208	
	EclipseAppLauncher.runApplication(Object) line: 143	
	EclipseAppLauncher.start(Object) line: 109	
	EclipseStarter.run(Object) line: 439	
	EclipseStarter.run(String[], Runnable) line: 271	
	DirectMethodHandle$Holder.invokeStatic(Object, Object, Object) line: not available	
	0x00000000a60c6800.invoke(Object, Object, Object, Object) line: not available	
	0x00000000a60c6c00.invokeExact_MT(Object, Object, Object, Object, Object) line: not available	
	DirectMethodHandleAccessor.invokeImpl(Object, Object[]) line: 155	
	DirectMethodHandleAccessor.invoke(Object, Object[]) line: 103	
	Method.invoke(Object, Object...) line: 580	
	Main.invokeFramework(String[], URL[]) line: 668	
	Main.basicRun(String[]) line: 605	
	Main.run(String[]) line: 1481	
	Main.main(String[]) line: 1454	

@mickaelistria
Copy link
Contributor Author

My bad, please ignore last comment which was exactly about ESCAPE being pressed. Everything seems fine, I'm pushing a pull request.

mickaelistria added a commit to mickaelistria/eclipse.platform.ui that referenced this issue May 31, 2024
In some circumstances (eg comparisons), users may want PopopDialogs to
remain visible when switching attention to another area.
This introduces a "Pin dialog" menu (and a "Close") to allow the dialog
to stick when users selects it.

Fixes eclipse-platform#1905
@mickaelistria
Copy link
Contributor Author

PR is #1906

mickaelistria added a commit to mickaelistria/eclipse.platform.ui that referenced this issue Jun 3, 2024
In some circumstances (eg comparisons), users may want PopopDialogs to
remain visible when switching attention to another area.
This introduces an opt-in flag to present a "Pin dialog" menu (and a
"Close") to allow the dialog
to stick when users selects it.

Fixes eclipse-platform#1905
@mickaelistria
Copy link
Contributor Author

And eclipse-platform/eclipse.platform#1403 as consumer

mickaelistria added a commit to mickaelistria/eclipse.platform.ui that referenced this issue Jun 5, 2024
In some circumstances (eg comparisons), users may want PopopDialogs to
remain visible when switching attention to another area.
This introduces an opt-in flag to present a "Pin dialog" menu (and a
"Close") to allow the dialog
to stick when users selects it.

Fixes eclipse-platform#1905
mickaelistria added a commit to mickaelistria/eclipse.platform.ui that referenced this issue Jun 7, 2024
In some circumstances (eg comparisons), users may want PopopDialogs to
remain visible when switching attention to another area.
This introduces an opt-in flag to present a "Pin dialog" menu (and a
"Close") to allow the dialog
to stick when users selects it.

Fixes eclipse-platform#1905
mickaelistria added a commit to mickaelistria/eclipse.platform.ui that referenced this issue Jun 7, 2024
In some circumstances (eg comparisons), users may want PopopDialogs to
remain visible when switching attention to another area.
This introduces an opt-in flag to present a "Pin dialog" menu (and a
"Close") to allow the dialog
to stick when users selects it.

Fixes eclipse-platform#1905
mickaelistria added a commit to mickaelistria/eclipse.platform.ui that referenced this issue Jun 10, 2024
In some circumstances (eg comparisons), users may want PopopDialogs to
remain visible when switching attention to another area.
This introduces an opt-in flag to present a "Pin dialog" menu (and a
"Close") to allow the dialog
to stick when users selects it.

Fixes eclipse-platform#1905
mickaelistria added a commit to mickaelistria/eclipse.platform.ui that referenced this issue Jun 11, 2024
In some circumstances (eg comparisons), users may want PopopDialogs to
remain visible when switching attention to another area.
This introduces an opt-in flag to present a "Pin dialog" menu (and a
"Close") to allow the dialog
to stick when users selects it.

Fixes eclipse-platform#1905
mickaelistria added a commit that referenced this issue Jun 11, 2024
In some circumstances (eg comparisons), users may want PopopDialogs to
remain visible when switching attention to another area.
This introduces an opt-in flag to present a "Pin dialog" menu (and a
"Close") to allow the dialog
to stick when users selects it.

Fixes #1905
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants