Skip to content

🚀 Clear assertion greyed-out lines on restart and highlight issue locations#232

Open
svenjeschmitt-ops wants to merge 154 commits intomunich-quantum-toolkit:mainfrom
svenjeschmitt-ops:main
Open

🚀 Clear assertion greyed-out lines on restart and highlight issue locations#232
svenjeschmitt-ops wants to merge 154 commits intomunich-quantum-toolkit:mainfrom
svenjeschmitt-ops:main

Conversation

@svenjeschmitt-ops
Copy link
Contributor

@svenjeschmitt-ops svenjeschmitt-ops commented Dec 18, 2025

Description

This pull request improves the debugging highlight functionality and fixes an issue where greyed-out highlights were not correctly reset between executions.

When an issue is detected in the code, the extension highlights the affected line in red and displays a descriptive error message explaining the nature of the problem. This visual feedback helps users quickly identify both the location of the error and its underlying cause.

A second part of the implementation concerns the assertion functionality. After an assertion failure, the extension greys out all lines of code that cannot have caused the error. While this behaviour is intended, the greyed-out highlights were previously not cleared when a new execution started. As a result, lines remained greyed out until the editor was closed and reopened.

Overall, the highlighting functionality provides an efficient way to show where an error occurred and what caused it. This change introduces an explicit reset of all greyed-out highlights on launch and restart events, ensuring that each execution starts with a clean editor state.

Fixes #(issue)

Checklist:

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

This reverts commit dd89f76.
Copy link
Collaborator

@DRovara DRovara left a comment

Choose a reason for hiding this comment

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

Thanks a lot @svenjeschmitt-ops for the updates.

I still have some requests for changes, it would be really nice if you could implement them if you find some time.

Feel free to resolve any of the comments you have addressed as suggested, but if you are unsure about them or believe they require further discussions, you can also leave them unresolved and I will check them on my next review.

Thanks a lot!

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.

3 participants