Can we have debuggers in SL code playground? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 16

Can we have debuggers in SL code playground?

Had this question for quite sometime now. We are very well aware of the auto-completion and predictive text which is already in place. Just a suggestion, can we also have debugger functionality? To verify data and control flow in any algorithm. It has it's own advantages - will allow developers to do their unit testing at their end, before code is made public. Will it be too extensive? Is it practical to be implemented? For web based or mobile application? Any suggestions or recommendations welcome! 😇

20th Jul 2017, 5:14 AM
Apoorva Shenoy Nayak
Apoorva Shenoy Nayak - avatar
6 Answers
+ 9
Kuba's answer is spot-on, and I'll add web caveats from personally digging. The webview running web codes is a 'mobile embed' version of Google Chrome called Chromium (versions differ by Android release). It does not have the same feature set as a full-blown browser, and there are many non-functional stubs or throws for security violations (affecting debug hooks, someone with a PC may have more luck). Additionally, a <base> tag* is inserted that sets document origin to "about:blank", which leads nav links (and location changes) to spawn a browser instead of (e.g.) chrome://chrome-urls to get at the profiler, tracer, etc. The best I've been able to do is dump the entire DOM and make quickie inspectors: https://code.sololearn.com/WVxar9XmY1N4/?ref=app https://code.sololearn.com/WJveUSCzVZid/?ref=app * https://www.w3schools.com/tags/tag_base.asp --> "Access to service workers is denied in this document origin" (i.e., the base url)
20th Jul 2017, 4:11 PM
Kirk Schafer
Kirk Schafer - avatar
+ 16
As the compilers/interpreters are remote in Sololearn, I think it would be very hard to implement it without changing the code-to-result mechanism. Now you are just sending your code which is parsed remotely, executed remotely and you only receive the result. Nothing else. A potential debugger would require a more interactive approach. P.S. Situation is different for web codes, of course.
20th Jul 2017, 5:52 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 12
You are saying like it is easy as ABC. The current code playground I better in the way that it automatically completes quotations and brackets. If you want debuggers use the web version. The incorrect lines will have a ❌ next to it. Onmousehover it will shoe kindof what is wrong. Which leads to this: https://www.sololearn.com/discuss/549501/?ref=app
20th Jul 2017, 1:37 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 6
It would be awesome ! But I think it will be hard to make the UI for the app because of the small size restriction
20th Jul 2017, 5:47 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 5
Thank you Kuba and Kirk for giving an in-depth insights into mobile as web versions of SL! Really appreciate your time & effort😇 P. S: Kirk, thanks for sharing the metadata & DOM structure, it is very useful!
21st Jul 2017, 8:56 AM
Apoorva Shenoy Nayak
Apoorva Shenoy Nayak - avatar
- 1
Here is also a similar but maybe just a less extensive suggestion. https://www.sololearn.com/discuss/551176/?ref=app
21st Jul 2017, 4:55 AM
LaserHydra
LaserHydra - avatar