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

Abierto
#1,519 0 comentarios 5 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python, rust
Área
devtools

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Rust
Estrellas
4.3k
Forks
391
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rust-ndarray/ndarray

Todos los issues de rust-ndarray/ndarray

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.