Skip to content

fix(debugger): restrict line breakpoints - #659

Closed
kopavel wants to merge 1 commit into
robotcodedev:mainfrom
kopavel:main
Closed

kopavel wants to merge 1 commit into
robotcodedev:mainfrom
kopavel:main

Conversation

@kopavel

@kopavel kopavel commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #658.

Restricts RobotCodeLineBreakpointType to Robot Framework .robot and .resource files.

Previously, canPutAt() returned true unconditionally, making the RobotCode line breakpoint type applicable to unrelated files such as C# sources. In Rider this could cause newly created C# breakpoints to be registered as RobotCode breakpoints instead of .NET breakpoints.

Type of change

  • Bug fix
  • New feature
  • Refactor / internal change
  • Documentation
  • Build / CI / tooling
  • Breaking change

Checklist

  • I have read the Contribution Guide and the AI and Automated Contribution Policy.
  • The change is focused on a single concern (no unrelated refactors or formatting noise).
  • Tests for the change have been added or updated, and hatch run test:test passes locally (RF matrix against the default Python) — or N/A for documentation-only / non-code changes.
  • hatch run lint:all passes (also enforced by the pre-commit hooks) — or N/A for documentation-only / non-code changes.
  • Documentation has been updated where relevant (no documentation changes required).
  • Generated files (if any) were regenerated with the documented script, not edited by hand. No generated files were changed.
  • Commits follow Conventional Commits and are cryptographically signed.

AI / tooling disclosure

  • No AI/automation was used beyond ordinary editor autocomplete.
  • AI/automation was used; tool(s): ChatGPT
    • I reviewed the generated output manually, understand it, and verified it locally.

Additional notes

The JetBrains plugin was successfully rebuilt after the change.

The fix was also tested in Rider 2026.2.2 with RobotCode 2.7.0 by replacing the affected compiled breakpoint classes in the installed plugin.

Verified manually:

  • .robot and .resource files continue to support RobotCode breakpoints.
  • Newly created .cs breakpoints are handled by the Rider/.NET debugger.
  • Existing .NET breakpoints continue to work.

@d-biehl

d-biehl commented Oct 6, 2026

Copy link
Copy Markdown
Member

Thanks a lot for the PR! Both changes are fixed now: the breakpoint fix for #658 is already on main, and the default extension for resource files follows with the next push and lists you as co-author. Both will be part of the next RobotCode release, so I'm closing this PR.

One thing to watch out for: canPutAt here compares the file itself with the file type (file == RobotSuiteFileType). A VirtualFile is never equal to a FileType, so the check always returns false and would turn off breakpoints in .robot and .resource files as well. It has to look at the file's type instead, file.fileType == RobotSuiteFileType, which is what the fix on main does.

@d-biehl d-biehl closed this Oct 6, 2026
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.

[BUG] RobotCode hijacks line breakpoints in non-Robot files

2 participants