Future R Language change requests / contributions
まだ誰も着手していません。
評価
調査の方向性
まず、要求されている R-language と browser-hook の変更を確認します。特に、リンクされている src/main/eval.c の 1313-1315 行と、参照されている vscDebugger の議論を確認してください。debugadapter で引き続き対応可能な制限がどれか、またそれが R に upstream されるべきものかを判断します。完了条件は、このカタログを、合意済みの検証パスを伴う、決定済みで実装可能な 1 つの要求に絞り込むことです。
索引モデルが issue の本文から書いたものです。
説明
While developing this, I found that there are a few features that are unfortunately quite difficult to implement. Some of which can be made significantly simpler with a few changes to the R language. This issue catalogs those changes.
Change Requests
❓ Top level pre-execution hook
Currently we have addTaskCallback to register callbacks for code to run after a top level expression, but unfortunately have no mechanism of registering code to run before each top level expression.
Without this feature, debug statements are processed only upon each top level expression's completion in the REPL, meaning that the state of the debugger in the REPL lags behind the state of the debugger in the IDE and is only synchronized after a top level callback.
With this feature, any new breakpoint traces can be set before user input is evaluated, minimizing debugger state desync.
✅ Browser callback hooks
Currently a "shadow" browser is used, which introduces an enormous amount of complexity to the project. The browser prompt is a fixed part of the R language with almost no opportunities to inject code in its REPL. To handle this, a process is forked and its output is split between the REPL presented to the user while commands and output required for the debugger are hidden and communicate directly with the DAP server.
Instead, if hooks could be added to the browser REPL akin to the standard REPL task callbacks, then this code could be executed in the foreground process directly without cluttering the REPL output with messy server messaging calls.
Step Information in Browser Hook
- Getting access to the expression that is being debugged, not just the
sys.call(). Ideally with position information within the evaluating function. This seems to be accessible in-between browser steps at the C level (SrcrefPrompt, but I can't figure out how to grab this information on the R side. Update: this is available indebug()prompts, but notbrowser()prompts - Would be nice to have some information about what stepping commands are issued in the browser hook (
n,s,c, etc) conditionargument ofdebug()appears to be broken?f <- function(x) { x } debug(f, condition = list(test = 123)) f() #> Browse[1]> browserCondition() #> NULL- Would love a way to disable the
debug at <file>#<line>: ...text that gets spit out during each debug step now that browser hooks allow for custom-built prompts.
Other mentions of this limitation
The core challenge imposed by having a rather fixed debug browser was also felt in the vscDebugger project, which got around this challenge by running a separate R process governed by javascript. This method relies on parsing of stdout.
from https://github.com/ManuelHentschel/VSCode-R-Debugger/issues/156#issuecomment-990167766
The main problem with the vscDebugger package is that there seems to be no way to control the program flow (stepping through code while debugging) from within R itself. Therefore, I am using a node-based wrapper, which controls the input to/output from an R process underneath.
- 主要言語
- R
- スター
- 20
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dgkf/debugadapter のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
dgkf/debugadapter#25 · コメント 3 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
dgkf/debugadapter#24 · コメント 3 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
dgkf/debugadapter#18 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
dgkf/debugadapter#15 · コメント 5 件 · リアクション 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
dgkf/debugadapter#13 · コメント 3 件 ·
dgkf/debugadapter の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
bennettoxford/opencodecounts#170 ·
-
complexity::1-low effort::1-hours priority::3-could
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
jumpingrivers/audit.workbench#43 ·
メンテナーはふだん 1 日以内に返信
-
complexity::1-low effort::1-hours priority::3-could
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
jumpingrivers/audit.connect#71 ·
メンテナーはふだん 1 日以内に返信
-
bug complexity::1-low effort::1-hours priority::2-should
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
jumpingrivers/audit.base#61 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
pharmaverse/admiraldev#580 ·