Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting of registers when debugging #257

Merged
merged 8 commits into from
Oct 6, 2022
Merged

Conversation

themkat
Copy link
Contributor

@themkat themkat commented Sep 18, 2022

Implements setVariable requests for the debugger, and support setting registers values (includes support for VICE using register set operation). Supports sending in decimals, hexadecimals and binary values (e.g, 128, $d0 and %00001000 respectively). It should be easy enough to extend the support to other types of variables as well, but have kept that as future work to not make the PRs too large. There is also a minor challenge with name crashes (e.g, X as both a variable and a register name) that should be thought of before implementing regular variables. (simplest solution is simply to not allow those name crashes). One TODO addresses a future improvement that might help the implementation of general variable setting.

Fixes #110

Unsure if/where this should be documented. Feel free to suggest something 🙂

@sagacity
Copy link
Member

Thanks again for your great work! I guess it's fine if there is a clash with variables for now: if you want to set a variable in the debugger just don't name it the same as a register (which seems like pretty solid advice anyway).

Regarding documentation, by this point it's probably nice to have a small 'debugging' page in the "IDE Support" part of the docs, but I can understand if you don't want to write that.

@themkat
Copy link
Contributor Author

themkat commented Sep 22, 2022

Regarding documentation, by this point it's probably nice to have a small 'debugging' page in the "IDE Support" part of the docs, but I can understand if you don't want to write that.

That is no problem 🙂 I will try to get something together this evening or tomorrow. Can't promise it will be perfect, but we can use it as a starting point.

EDIT: Ended up with just adding a section about the set variable functionality in the VSCode part of the documentation. The VSCode part is very general anyway.

@sagacity
Copy link
Member

Thanks again for the updates, these are really nice quality-of-life features! I'm very busy this week unfortunately but I hope I can get this reviewed and merged soon.

@sagacity sagacity merged commit 18ced63 into datatrash:master Oct 6, 2022
@themkat themkat deleted the GH-110 branch October 6, 2022 14:43
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.

Allow setting of registers
2 participants