Comments (7)
- Ya they use websockets, my bad. Most likely I opened my network tab after the websocket connection was established, so missed it.
- Thanks for the input. Will try to make one for python just to get an idea of how things happen.
PS: Awesome project!
from riju.
Yeah, if you want to have a good time, rather than starting from the mess I have made in Riju, you might want to actually take https://github.com/radian-software/python-in-a-box as a starting point.
from riju.
Yeah, if you want to have a good time, rather than starting from the mess I have made in Riju, you might want to actually take https://github.com/radian-software/python-in-a-box as a starting point.
This is really easy to understand. Thanks!
from riju.
Hi,
This is what i could come up with:
https://github.com/RahulBadenkal/python-in-a-box-debugger
Reference loom: https://www.loom.com/share/0f0d65d0087b46babfc8f1e1c03515ae
Minor change:
- Using built in child process package of node instead of node-pty. As needed to separate out stdin and stdout content.
Idea:
- Same as what you suggested last time, using python3's pdb module and piping the output from the terminal to browser.
Trying to replicate pycharm's debug functionality, but faced a few issues right off the bat:
- The program in pdb auto restarts after ending, i would prefer it to terminate
- Not sure how to get the current line number. The info is there in the terminal's stdout, but the only way i can think of extracting it is some sort of regex/string processing but then since the data from the terminal comes in batches and not all together not sure how to apply regex on a continuos stream?
from riju.
I was trying to understand how this website does it but i noticed that no http/websockets calls that go when i run/debug the code. Does this mean its just compiling every language to javascript and just executing it on browser?
from riju.
See #168, just FYI.
That said, let me see what I can do about answering your questions.
- How hard do I think it would be? Probably a big project, but doable.
- Is it on the roadmap? Yeah, I didn't have any plans for it, and I have other things on my mind, but it doesn't seem out of line for the project, so if it were implemented (and I get things unbroken enough to actually deploy updates) then I wouldn't object to merging it in.
- How to go about it? I'm not sure. I'd have to do a survey of different languages' debuggers to see what the typical behavior is. You'd want to start by coming up with a set of abstractions that describes a debugger for an arbitrary language, and then figure out how those abstractions could be configured to invoke different language debuggers specifically. Then you'd wire up buttons on the frontend to trigger the relevant configurations on the backend, like how LSP is set up currently.
- How does onlinegdb work? Looks like it's got a websocket to me, you might have just missed it.
I'm not 100% sure how the debugger integration works, it's possible that the buttons are literally just sending words like continue
and next
on stdin to the pty, although that doesn't quite explain all the behavior I see. pdb might have some kind of control port that can be used to issue commands out of band.
from riju.
(Same underlying technology but way simpler because it does not attempt to do everything.)
from riju.
Related Issues (20)
- Error on `make image` HOT 1
- REPL output sometimes cuts off/drops early HOT 1
- Cannot run Elm HOT 1
- FYI: Project status HOT 3
- Mobile support HOT 4
- Error: non-Riju base image 'ubuntu:22.04' in Dockerfile for packaging image HOT 3
- Resource Limiting HOT 2
- Adding multiple classes in Java HOT 1
- Support passing the code as a query param in the URL HOT 1
- Add support for Coq, Lean, and Isabelle/HOL
- Difficulties in setting up local environment on Windows 11 HOT 3
- The page riju.codes doesn't work over IPv4 HOT 6
- bro HOT 1
- Default Tab indentation of c example is 2 spaces, but editor's 4. HOT 1
- Add jShell for java REPL
- The letters in the language (qalb) console (the right side) upside down
- website is down HOT 1
- Error in setting up locally HOT 1
- According to the Self-host document, I tried to build docker image and run the service, but failed. The following is stackTrace log HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riju.