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

[feature]: Add breakpoints for VM and CPU emulators #441

Open
2 tasks done
happytomatoe opened this issue Sep 1, 2024 · 4 comments
Open
2 tasks done

[feature]: Add breakpoints for VM and CPU emulators #441

happytomatoe opened this issue Sep 1, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@happytomatoe
Copy link
Contributor

happytomatoe commented Sep 1, 2024

Tool

General

Interface

None

Contact Details

No response

What feature are you proposing?

Hi! First of all thanks for this product.
Is there a table that compares the features between desktop and web version? Why I am asking - I've just finished writing vm translator and some portion of the time I've spent on debugging. I totally forgot that desktop version has breakpoints. That would make the process a little bit easier. I didn't see any mentions about breakpoints for web ide. Is this feature available in web version?

Additional Comments

No response

Do you want to try to add this feature?

  • I want to try to add this feature!

Code of Conduct

  • I agree to follow this project's Code of Conduct
@DavidSouther
Copy link
Collaborator

The current goal is "feature parity", so this would be a thing we've missed in the current IDE and should consider implementing or explicitly marking as unsupported. I'm going to update this issue to track breakpoints; if you notice other discrepancies, please let us know.

@netalondon @Shimon-Schocken please comment on where we should prioritize adding debugger breakpoints for VM and CPU Emulators?

@DavidSouther DavidSouther added the enhancement New feature or request label Sep 16, 2024
@DavidSouther DavidSouther changed the title [documentation]: Is there a table that compares desktop legacy version with web version? [feature]: Add breakpoints for VM and CPU emulators Sep 16, 2024
@happytomatoe
Copy link
Contributor Author

@DavidSouther @netalondon How to pause a runner from inside vm.ts? I.E. in the case if the current running operation has a breakpoint

@happytomatoe
Copy link
Contributor Author

The same applies to CPU emulator

@netalondon
Copy link
Collaborator

@happytomatoe If I understand you correctly, you can emulate this behavior by immediately returning from the step function here https://github.com/nand2tetris/web-ide/blob/main/simulator/src/vm/vm.ts#L634.
You can see this is what we do if the OS is blocked, for example when waiting for user input.

Should be pretty similar for the CPU.

Let me know if that answers your question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants