feat(workflow): advanced debug mode with breakpoints and variable watch#6446
Open
stakeswky wants to merge 3 commits intolabring:mainfrom
Open
feat(workflow): advanced debug mode with breakpoints and variable watch#6446stakeswky wants to merge 3 commits intolabring:mainfrom
stakeswky wants to merge 3 commits intolabring:mainfrom
Conversation
- Add NodeLogItemType (time/level/message/data) to runtime types - Instrument workflow dispatcher with lifecycle logs: - Node start (name, type) - Params resolved (keys) - Dispatch callback (catch error, edge count) - Execution finished (duration, error status) - Error responses - Attach nodeLogs to DispatchNodeResponseType and debug responses - Add nodeLogs to FlowNodeItemType debugResult schema - Render node logs in WholeResponseModal (chat response detail) - Render node logs in NodeDebugResponse (workflow debug panel) - Pass nodeLogs through workflowDebugContext - Add i18n keys for zh-CN, en, zh-Hant Closes: workflow node log feature from README roadmap
… watch - Add breakpoint support on workflow nodes: - hasBreakpoint field in FlowNodeItemType schema - Toggle breakpoint via node right-click menu - Red dot visual indicator on nodes with breakpoints - Add run-to-breakpoint functionality: - onRunToBreakpoint in debug context auto-advances execution - Stops when next entry node has a breakpoint set - 'Continue' button alongside existing 'Next Step' in debug panel - Add variables watch panel: - debugVariables state tracks current workflow variables during debug - Variables panel rendered in debug result card - Shows all variable key-value pairs with monospace formatting - Add i18n keys for zh-CN, en, zh-Hant Part of: Advanced workflow debug mode from README roadmap
Preview sandbox Image: |
Preview mcp_server Image: |
Preview fastgpt Image: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Implements the Advanced Debug Mode feature from the project roadmap — adds breakpoint support, run-to-breakpoint execution, and a variables watch panel to the workflow editor debug experience.
Changes
Breakpoints
hasBreakpointfield added toFlowNodeItemTypezod schemaRun to Breakpoint
onRunToBreakpointinWorkflowDebugContext: auto-advances step-by-step execution, stopping when the next entry node has a breakpointVariables Watch Panel
debugVariablesstate tracks current workflow variables throughout the debug sessioni18n
debug.Set breakpoint/debug.Remove breakpoint/debug.Breakpointdebug.Continue/debug.Run to breakpointdebug.Variables watchHow it works
The existing debug mode uses a step-by-step API pattern:
postWorkflowDebug→ backend runs entry nodes → returns nextentryNodeIdsThis PR adds:
hasBreakpoint, checked before each steponNextNodeDebugautomatically, checking after each step if the next entry node has a breakpointnewVariablesin each debug response, displayed in real-timeFiles Changed (7 files, +186/-16)
packages/global/core/workflow/type/node.tshasBreakpointto schemapackages/web/i18n/{en,zh-CN,zh-Hant}/workflow.jsonNodeCard.tsxNodeDebugResponse.tsxworkflowDebugContext.tsxonRunToBreakpoint+debugVariablesstateTesting
lint-staged)