Skip to content

fix: resolve debug runtime breakpoint and state event inconsistencies#1404

Open
cristipufu wants to merge 4 commits intomainfrom
fix/debug-runtime-breakpoint-fixes
Open

fix: resolve debug runtime breakpoint and state event inconsistencies#1404
cristipufu wants to merge 4 commits intomainfrom
fix/debug-runtime-breakpoint-fixes

Conversation

@cristipufu
Copy link
Member

Summary

  • project_dir mismatch: get_schema now uses CWD as project_dir (matching BreakpointController) so graph node IDs are consistent across schema and debug paths
  • qualified_node_name line mismatch: State events use graph node IDs (_first_code_line) instead of frame.f_lineno (def line), so clients can correctly map state events to graph nodes
  • SignalR bridge node reference: _add_breakpoints and _handle_remove_breakpoints now prefer node.id (file:line format) over node.name, enabling function-level breakpoints from the remote debugger
  • Generator/coroutine spurious events: Suppress duplicate STARTED on yield/await resumption and skip COMPLETED on yield; also fix non-project coroutine frame state leak that could poison frame-id reuse

Test plan

  • Added TestProjectDirConsistency (2 tests): cross-file breakpoints via graph node IDs; schema and debug produce matching node IDs
  • Added TestQualifiedNodeName (1 test): state event qualified_node_name matches graph node IDs including for functions with docstrings
  • Added TestGeneratorStateEvents (2 tests): generator yields and async await don't cause duplicate STARTED events
  • Added TestSignalRBridgeBreakpoints (3 tests): node.id preferred over node.name; fallback to name; remove uses same logic
  • All 1565 tests pass

🤖 Generated with Claude Code

Fix four issues in the debug breakpoint stack:

1. project_dir mismatch: get_schema now uses CWD as project_dir (matching
   BreakpointController) so graph node IDs are consistent.

2. qualified_node_name line mismatch: state events now use graph node IDs
   (first-code-line) instead of frame.f_lineno (def line), so clients can
   map state events to graph nodes.

3. SignalR bridge node reference: _add_breakpoints and _handle_remove_breakpoints
   now prefer node.id (file:line format) over node.name for function runtimes.

4. Generator/coroutine spurious events: suppress duplicate STARTED on
   yield/await resumption and skip COMPLETED on yield. Also fix non-project
   coroutine frame state leak that could poison frame-id reuse.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Mar 3, 2026
cristipufu and others added 3 commits March 3, 2026 16:48
…bridge

Revert bridge changes — handle function-name breakpoints entirely in
BreakpointController._build_breakpoint_map by resolving bare names via
the node_id_map. Replace SignalR bridge tests with controller-level
resolution tests + an E2E test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Re-add the dedup guard for single-line expressions like
`result = dict(value=bar(val))` where bytecode revisits the
call-site line after evaluating nested arguments. Track last_line
per frame and suppress only when the immediately preceding line
event was the same line (no intervening lines), so loop iterations
still fire correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the single-line-only last_line check with a smarter heuristic:
track whether any backward jump (line < last_bp_line) occurred since the
last breakpoint fired. Bounce-backs only advance forward into argument
lines then return — no backward jump. Loop iterations go backward to the
loop header first, so the breakpoint correctly fires again.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant