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

Preferences and UI elements incorrectly remain hidden when using Core Build to debug #972

Closed
jonahgraham opened this issue Dec 16, 2024 · 3 comments · Fixed by #974
Closed

Comments

@jonahgraham
Copy link
Member

Describe the bug

There are a number of preferences and other UI elements that are only enabled once that flow started. For example, Preferences -> C/C++ -> Debug -> GDB is only visible after launching a GDB debug session:

image

With core build and launch, those preferences are not being displayed.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new workspace
  2. Observe no Preferences -> C/C++ -> Debug -> GDB visible
  3. Create a C/C++ CMake project, build and debug it
  4. Still no GDB preference page visible
  5. Create a C/C++ Application Launch Configuration and launch it
  6. Preferences -> C/C++ -> Debug -> GDB visible

Expected behavior
Once anything with GDB is touched, make the UI visible.

@jonahgraham
Copy link
Member Author

The key line of code that needs to run is

org.eclipse.cdt.launch.LaunchUtils.enableActivity("org.eclipse.cdt.debug.dsfgdbActivity", true); //$NON-NLS-1$

jonahgraham added a commit to jonahgraham/cdt that referenced this issue Dec 16, 2024
… Build

When using Core Build, the GdbLaunchDelegate is not used to create
the launch. Therefore in the core launch we need to enable the
activity to show all the DSF GDB specific UI in another place.

This PR adds one of those places, but it may very well be there are
other places that this should be added.

Fixes eclipse-cdt#972
@jonahgraham
Copy link
Member Author

I have put a possible fix in #973 - but I do wonder if we can simplify the code by removing the activity entirely. I think the only thing hidden is some preference pages, but need to check that. Hiding those preference pages was relevant when DSF was new and we didn't want to confuse users who were using the now removed CDI debugger.

jonahgraham added a commit to jonahgraham/cdt that referenced this issue Dec 16, 2024
The CDT Debug Activites was originally added when we had two
distinct debuggers in CDT, the DSF one and the CDI one. To
eliminate confusion the preferences for the respective
debug infrastructures were only displayed if users actually
ran such a debug session.

Now with just one debug infrastructure, we should always display
the preference pages. It also removes some confusion that some
preference pages weren't visible until after you started the
debug session. So for example, users couldn't turn on or off
a bunch of default settings until after creating and launching
a debug session.

I have left the enableActivity call in GdbLaunchDelegate in
case any extenders were hiding some of their UI behind that key.

The only exception in the above is the View Performance preference
page which was misplaced in the top level Run/Debug preference
tree, even though it is CDT specific. That preference page has
been re-parented to C/C++ -> Debug

Fixes eclipse-cdt#972
@jonahgraham
Copy link
Member Author

I have added my preferred fix in #974

jonahgraham added a commit to jonahgraham/cdt that referenced this issue Dec 17, 2024
The CDT Debug Activites was originally added when we had two
distinct debuggers in CDT, the DSF one and the CDI one. To
eliminate confusion the preferences for the respective
debug infrastructures were only displayed if users actually
ran such a debug session.

Now with just one debug infrastructure, we should always display
the preference pages. It also removes some confusion that some
preference pages weren't visible until after you started the
debug session. So for example, users couldn't turn on or off
a bunch of default settings until after creating and launching
a debug session.

I have left the enableActivity call in GdbLaunchDelegate in
case any extenders were hiding some of their UI behind that key.

The only exception in the above is the View Performance preference
page which was misplaced in the top level Run/Debug preference
tree, even though it is CDT specific. That preference page has
been re-parented to C/C++ -> Debug

Fixes eclipse-cdt#972
jonahgraham added a commit that referenced this issue Jan 6, 2025
The CDT Debug Activites was originally added when we had two
distinct debuggers in CDT, the DSF one and the CDI one. To
eliminate confusion the preferences for the respective
debug infrastructures were only displayed if users actually
ran such a debug session.

Now with just one debug infrastructure, we should always display
the preference pages. It also removes some confusion that some
preference pages weren't visible until after you started the
debug session. So for example, users couldn't turn on or off
a bunch of default settings until after creating and launching
a debug session.

I have left the enableActivity call in GdbLaunchDelegate in
case any extenders were hiding some of their UI behind that key.

The only exception in the above is the View Performance preference
page which was misplaced in the top level Run/Debug preference
tree, even though it is CDT specific. That preference page has
been re-parented to C/C++ -> Debug

Fixes #972
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant