dev tools: invoke debugger/logger ineractively
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 24.4k
- Forks
- 2.3k
- Merge moyen
- 2 j 7 h
- PR mergées (30 j)
- 13
Description
Now that we have the callback graph in the dev tools UI, let's use that to enable interactive callback debugging!
- Use clicks on a callback in the graph, and you get extra debugging of that callback. Not sure what the UI looks like to choose one, but either:
- It becomes a breakpoint (maybe the callback circle changes from green to red?)
- It gets a verbose logger - in Python there's https://github.com/cool-RR/PySnooper for example (callback circle turns orange?)
- That flags this callback (based on its output list) for debugging, somewhere in the redux state.
- When any callback is triggered, we check this state and if the requested outputs are flagged, add a key to the request like
debug: ('breakpoint'|'logging') - On the back end, if we see such a key AND the app was run with
dev_tools_ui: True(we don't want hackers to be able to hang the back end or dig into back-end code from production apps!), we invoke the specified debugger:- For
breakpoint, wrap the callback inpdb.runcall, which startspdbat the beginning of the function, in the server console (eventually perhaps we could pull this to the front end, but that sounds like a much bigger project). Then it's up to the user to run the debugger and allow the function to finish and return. - For
loggingwe wrap the callback in the appropriatepysnoopercall, capture the output, and return it with the output data, and display it in the error console. - @rpkyle do both of these modes have equivalents in R?
- For
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par examiner le callback graph existant dans la dev tools UI et le traitement des callback requests sur le backend. L’issue laisse indéterminés l’UI de sélection et les détails du logging ; pour considérer le travail comme terminé, il faudrait choisir une interaction de breakpoint ou de logging, transmettre ce choix via le state et les requests, et ne l’activer de manière sûre que lorsque dev_tools_ui est activé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python, react
- Domaine
- backend, devtools, frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100