Skip to content

Conversation

PoffM
Copy link

@PoffM PoffM commented Oct 12, 2025

What does this PR do?

Hi, I found some unexpected behavior when clicking 'Step Over' while debugging in VSCode. Multiple clicks are needed to move past a statement with multiple expressions, e.g. a function call with another function call as an argument, like logText(getText()).

The debug adapter uses the 'stepNext' command, which uses expression granularity. Changing to 'stepOver' would use statement granularity, consistent with vscode-js-debug and is the default in the DAP spec.

How did you verify your code works?

Manual testing:

Before change: 2 clicks per line

bun-stepNext.mp4

After change: 1 click per line

bun-stepOver.mp4

Copy link
Contributor

coderabbitai bot commented Oct 12, 2025

Walkthrough

The adapter’s next-step behavior was updated to use the Debugger.stepOver command instead of Debugger.stepNext in BaseDebugAdapter.next(). The internal stopped state continues to be set to "step". No other logic or error handling was changed.

Changes

Cohort / File(s) Summary of Changes
Debugger stepping behavior
packages/bun-debug-adapter-protocol/src/debugger/adapter.ts
Replaced the command sent in BaseDebugAdapter.next() from "Debugger.stepNext" to "Debugger.stepOver"; retained setting of stopped state to "step".

Pre-merge checks

✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately and succinctly summarizes the primary change of replacing the debug adapter’s 'stepNext' command with 'stepOver', making it clear to reviewers what the pull request does without extraneous detail or noise.
Description Check ✅ Passed The pull request description follows the repository template by clearly explaining the change under "What does this PR do?" and detailing the manual verification steps under "How did you verify your code works?", including before-and-after behavior links, so it fully satisfies the required structure.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b8b9d70 and ed6a175.

📒 Files selected for processing (1)
  • packages/bun-debug-adapter-protocol/src/debugger/adapter.ts (1 hunks)
🔇 Additional comments (1)
packages/bun-debug-adapter-protocol/src/debugger/adapter.ts (1)

567-570: LGTM! Excellent alignment with DAP specification.

The change from stepNext to stepOver correctly switches from expression-level to statement-level granularity, which improves the debugging experience by requiring only one click per statement. This aligns with both the DAP specification's default granularity and vscode-js-debug's implementation.

The stopped state remains appropriately set to "step", consistent with stepIn() and stepOut() methods.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant