posit-dev / posit-dev/positron

Launch configuration for C/C++ debugging of Ark packages

Open
#7,175 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lang: r
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

We could make it much easier to debug native code in a package by providing a launch configuration that would:

  • Automatically pick Ark's PID via a command. Ideally would not require executing code in Ark so it's possible to attach to a session that is running code (can be important to figure out why Ark is stuck). So the PID (which is unknown from the parent process) would be sent by Ark on startup and cached on the frontend side.

  • Include the Python code implementing formatters for R variables (#7171). This Python code would ideally live in Ark since it would be tightly integrated with internal APIs. It could be sent over to the frontend on startup.

  • Set codelldb's execution engine to native? Alternatively we can document that native expressions, such as calls to Ark debugging helpers (#7174), need to be prefixed with \nat in the Watch Pane. See https://github.com/vadimcn/codelldb/blob/master/MANUAL.md#expressions

  • Sets escape-non-printables to false, see #7174.

I'm not sure if this configuration should be provided by the R extension (dynamically) or by a usethis function (statically). My hunch is that a dynamic configuration is more convenient.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the requirements here and the linked issues #7171 and #7174, then review codelldb's expressions documentation. Compare a dynamic R-extension configuration with a static usethis configuration, including PID and formatter transfer. Done means the ownership choice and the requested launch, formatter, expression, and non-printable settings are defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python, r, typescript, vscode
Domain
desktop, developer-experience, devtools, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.