Improve debugger visualization for `ndarray` arrays using `#[debugger_visualizer]`
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
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:

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

(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
-
The Rust Reference: Some examples to use
#[debugger_visualizer]attribute. -
Rust Compiler Development Guide: Describes the underlying implement in Rust compiler.
- Linguagem predominante
- Rust
- Estrelas
- 4.3k
- Forks
- 391
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de rust-ndarray/ndarray
-
.is_all_nan() returns true for an all-finite arrayTalvez já em andamento @youdie006 assumiu há 51 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
rust-ndarray/ndarray#1612 · 1 comentário · 1 reação ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
rust-ndarray/ndarray#1617 · 1 comentário ·
-
Stack overflow in `triu`Talvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertabug good first issue
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
rust-ndarray/ndarray#1615 · 1 comentário ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
rust-ndarray/ndarray#1610 ·
-
Empty Array lead to "The strides must not allow any element to be referenced by two different indices"Talvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
rust-ndarray/ndarray#1609 ·
Todas as issues de rust-ndarray/ndarray
Issues semelhantes
-
Rust: `const _` gets its file's node ID, so the file node is relabelled `_` and gains a self-loopAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Graphify-Labs/graphify#4064 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
MessageField::clone copies the whole payload, even for an unset field: clone 1.4× slower than prost on small messagesTalvez já em andamento @benedikt-bartscher assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
anthropics/buffa#549 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
apache/datafusion#26030 ·
Mantenedores costumam responder em até 1 dia