dev tools: invoke debugger/logger ineractively
オープン
まだ誰も着手していません。
feature
P3
- 主要言語
- Python
- スター
- 24.4k
- フォーク
- 2.3k
- 平均マージ
- 2日 7時間
- マージ済み PR(30日)
- 13
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず dev tools UI の既存の callback graph と、backend での callback requests の処理を確認します。この issue では選択 UI と logging の詳細が未決定のままです。完了するには、breakpoint または logging のためのインタラクションを選択し、その選択を state と requests に渡し、dev_tools_ui が有効な場合にのみ安全に有効化する必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python, react
- 領域
- backend, devtools, frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100