-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add json tracer as debug option #536
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chvp
approved these changes
Jan 13, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Only looked at the code, couldn't immediately find the functionality.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pr introduces a pythontutor based debugger
Generating the debug trace in python is handled by json-tracer
Visualizing these traces is handled by trace-component
The new class
Debugger
is responsible of rendering the trace and delegating all relevant events.The code editor is updated to show a line indicator in the sidebar.
The input component adds layout based on if a line is already used in the current debug step.
The output component add an opacity to output which is not present yet for the current debug step.
There is also a hard limit of 10 000 execution steps added to help students who encounter infinite loops.
This pr also made some styling changes to make it easier to override styles for users of the library.
![Peek 2023-12-22 15-17](https://private-user-images.githubusercontent.com/21177904/292505691-1b8c0c9e-a905-4b3f-a153-9b49ab0fa9f5.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NTM0NTYsIm5iZiI6MTczOTU1MzE1NiwicGF0aCI6Ii8yMTE3NzkwNC8yOTI1MDU2OTEtMWI4YzBjOWUtYTkwNS00YjNmLWExNTMtOWI0OWFiMGZhOWY1LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDE3MTIzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNmNmQ1NTk4YmNkYTc0OGE2Y2U1NmIwMGQ3ZTc0NjllY2EyNTdkZWNhNTY1MGYwY2I0YWUwNjFiM2M3MmM1Y2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.jQJA0Q-9ND-21MX0TzyzKdGq24IoZhRxRgQB1CZ03EU)