Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Future R Language change requests / contributions

オープン
#4 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
22/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
r
領域
devtools

調査の方向性

まず、要求されている 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 in debug() prompts, but not browser() prompts
  • Would be nice to have some information about what stepping commands are issued in the browser hook (n, s, c, etc)
  • condition argument of debug() 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dgkf/debugadapter のほかの issue

dgkf/debugadapter の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。