Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

MaksymKapelianovych
Copy link
Contributor

@MaksymKapelianovych MaksymKapelianovych commented Mar 26, 2025

fixed bugs:

  • fix pausing at breakpoint
  • select correct flow asset instance, instead of a first one spawned with the same name in MP
  • breadcrumbs were not visible if asset editor was opened before PIE start

changes:

  • world selection for inspected instances(hidden if there is only one world). If some world is selected, breakpoints will only be triggered for assets inside that world
  • in the top right corner of the graph PIE status will be displayed, based of selected world/instance
  • if there is an inspected instance of an asset, breakpoints will only be triggered for that instance
  • if there is no inspected instance of an asset, but there are active breakpoints, they will be triggered for all instances of an asset, debugger will temporarily set paused instance as inspected and clear after resume
  • world prefix for instances in dropdown
  • automatic reselection of previously inspected instance between PIE sessions (disabled by default, can be enabled in Editor Settings)
  • visual changes for breadcrumbs (added trailing delimiter, outline, max width, changed text style)
  • clicking on breadcrumb now will focus SubGraph node, that created inspected instance next in chain
  • pausing at breakpoint will focus paused asset window (open if needed) and focus node, that has triggered breakpoint
  • node breakpoint is no longer triggered if there is triggered breakpoint for any pin at the same time
  • "enable/disable/remove all breakpoints" is added to "debug" menu section
  • button "Go to Parent" was removed from the toolbar (the same can be achieved with breadcrumbs), but command was kept in order to let the ability to use shortcut for this action

fixed bugs:
 - fix pausing at breakpoint
 - select correct flow asset instance, instead of a first one spawned with the same name in MP
 - breadcrumbs were not visible if asset editor was opened before PIE start

changes:
 - world selection for inspected instances(hidden if there is only one world). If some world is selected, breakpoints will only be triggered for assets inside that world
 - in the top right corner of the graph PIE status will be displayed, based of selected world/instance
 - if there is an inspected instance of an asset, breakpoints will only be triggered for that instance
 - if there is no inspected instance of an asset, but there are active breakpoints, they will be triggered for all instances of an asset, debugger will temporarily set paused instance as inspected and clear after resume
 - world prefix for instances in dropdown
 - automatic reselection of previously inspected instance between PIE sessions (disabled by default, can be enabled in Editor Settings)
 - visual changes for breadcrumbs (added trailing delimiter, background color, max width)
 - clicking on breadcrumb now will focus SubGraph node, that created inspected instance next in chain
 - pausing at breakpoint will focus paused asset window (open if needed) and focus node, that has triggered breakpoint
 - node breakpoint is no longer triggered if there is triggered breakpoint for any pin at the same time
 - "enable/disable/remove all breakpoints" is added to "debug" menu section
 - button "Go to Parent" was removed from the toolbar (the same can be achieved with breadcrumbs), but command was kept in order to let the ability to use shortcut for this action
@@ -69,5 +69,5 @@ class FLOWEDITOR_API UFlowGraphEditorSettings : public UDeveloperSettings

public:
virtual FName GetCategoryName() const override { return FName("Flow Graph"); }
virtual FText GetSectionText() const override { return INVTEXT("User Settings"); }
virtual FText GetSectionText() const override { return INVTEXT("Graph User Settings"); }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to avoid name collision with UFlowUserSettings. It would be great if somebody had a better choice for name.

*
*/
UCLASS(Config = EditorPerProjectUserSettings, meta = (DisplayName = "Flow"))
class FLOW_API UFlowUserSettings : public UDeveloperSettings
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class for user settings, that can't be moved to Editor module for now. I would also move here UFlowSettings::bUseAdaptiveNodeTitles, but it is beyond the scope of this PR.

{
if (!GUnrealEd->SetPIEWorldsPaused(true))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's why I personally prefer writing Cond == false instead of !Cond 🙂

@MaksymKapelianovych
Copy link
Contributor Author

Toolbar changes

Before
image

After
image

Several worlds
image

@MaksymKapelianovych
Copy link
Contributor Author

MaksymKapelianovych commented Mar 26, 2025

And several words about a bug when several breakpoints can be triggered in the same frame.

The best way to fix this would be to use FSlateApplication::EnterDebuggingMode() when flow breakpoint is hit. This function contains a while loop, that updates only Slate and Renderer, allowing editor UI to work, but for any other system code execution is completely stopped. But for this function to work in Flow debugger at least this change in UE source code is required: inside FInternalPlayWorldCommandCallbacks::IsStoppedAtBreakpoint_InEngineMode() change FKismetDebugUtilities::GetCurrentDebuggingWorld() == nullptr to 'GEditor->PlayWorld == nullptr'. I tested this change locally - everything is fine, BP breakpoints are working, Blutility breakpoints also working, but there is still a chance I missed something. Potentially, this change will allow us even to implement stepping for Flow debugger, if this ever be needed.

Other way it can be fixed is to implement "pin execution request" system. FlowAssets will no longer directly trigger input/output pins in Editor, but direct them to debugger. If there is no hit breakpoints - execute requested pins normally, otherwise store request in pending list, that will be executed after resume. I don't really like this approach, I think it potentially can introduce some bugs because of the postponed execution of nodes.

@MaksymKapelianovych
Copy link
Contributor Author

Important note about world names.

As can be seen on image above, client indexes start with 1 (Client 1, Client 2, ...), when debugging BP they start with 0 (Client 0, Client 1, ...), but on clients' window titles they start with 1 for some reason. So there is inconsistency in UE, and I chose to align with window titles, cause sometimes, after long debugging sessions it is very easy to get confused and forget that debugger indexes are shifted by 1, and spend a long time, trying to debug wrong object...

But I can change it to align with BP debugger, if needed

@MaksymKapelianovych
Copy link
Contributor Author

We can also move breadcrumbs from toolbar to graph tab, like this. Tbh I prefer this layout

image

@MothDoctor MothDoctor self-assigned this Apr 4, 2025
@MothDoctor MothDoctor force-pushed the 5.x branch 3 times, most recently from 4b00fe8 to daa3fef Compare May 15, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants