Improve debugger visualization for `ndarray` arrays using `#[debugger_visualizer]`

Aberta
#1,519 0 comentários 5 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python, rust
Domínio
devtools

Direção de pesquisa

Start by reviewing discussions in issues #827 and #366, then read the Rust Reference debugger attribute documentation and the Rust Compiler Development Guide section on supported debuggers. Evaluate whether embedding Python pretty-printers and .natvis files with #[debugger_visualizer] is feasible for ndarray arrays. Done means a decided approach for official debugger visualization support.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

This issue has been discussed in #827 and #366, but it remains partially unresolved.

Problem and Previous solution

When debugging ndarray arrays in VSCode, their display is often not human-readable:

image

However, with this custom formatter.py file (along with some additional configuration), the display becomes much more readable:

image

(This solution was originally provided by @MartinRJDagleish in this comment)

More Discussion

The #[debugger_visualizer] attribute has been stabalized in Rust 1.71.0 for 2 years, which can be used to embed a debugger visualizer file into the debug information. This means we can write pretty-printer files (Python script, for GDB and LLDB) and .natvis files (for Windbg) for ndarray arrays, and embed them into the Rust code using the attribute, to provide official support for debugger visualization of ndarray arrays.

I'm not sure whether it is a feasible approach, but I'm glad to have a discussion.

Relevant Links

Linguagem predominante
Rust
Estrelas
4.3k
Forks
391
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de rust-ndarray/ndarray

Todas as issues de rust-ndarray/ndarray

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.