Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/hints viewer v2 #1225

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ Install ESP-IDF and ESP-IDF Tools by following the [install tutorial](./docs/tut

> **NOTE:** Please take a look at [Working with multiple projects](./docs/MULTI_PROJECTS.md) for more information. Default is User settings.

- On the first time using the extension, press <kbd>F1</kbd> to show the Visual Studio Code Command Palette and type **ESP-IDF: Configure ESP-IDF extension** to open the extension configuration wizard. This will install ESP-IDF, ESP-IDF tools, create a virtual python environment with ESP-IDF and this extension python packages and configure the extension settings with these values.
- On the first time using the extension, press <kbd>F1</kbd> to show the Visual Studio Code Command Palette and type **ESP-IDF: Configure ESP-IDF extension** to open the extension configuration wizard. This will install ESP-IDF, ESP-IDF tools, create a virtual python environment with ESP-IDF and this extension python packages and configure the extension settings with these values.

> **NOTE:** For versions of ESP-IDF < 5.0, spaces are not supported inside configured paths.

> **NOTE:** Please take a look at [Install tutorial](./docs/tutorial/install.md) documentation or the [Setup documentation](./docs/SETUP.md) for details about extension setup and configuration.
Expand Down Expand Up @@ -162,6 +163,7 @@ Click <kbd>F1</kbd> to show Visual studio code actions, then type **ESP-IDF** to
| Size analysis of the binaries | <kbd>⌘</kbd> <kbd>I</kbd> <kbd>S</kbd> | <kbd>Ctrl</kbd> <kbd>E</kbd> <kbd>S</kbd> |
| Unit Test: Build and flash unit test app for testing | | |
| Unit Test: Install ESP-IDF PyTest requirements | | |
| Search Error Hint | | |

# About commands

Expand Down
27 changes: 27 additions & 0 deletions docs/tutorial/hints_viewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Hints Viewer

This feature enhances your development experience by providing helpful hints for errors detected in your code.

## Features

### Hover Over Errors for Hints

When you hover over errors in the text editor, if the error matches one listed in our hints.yml file, a hint is displayed.

<p>
<img src="../../media/tutorials/hints_viewer/hover.gif" alt="Gif of hovering feature">
</p>

### Bottom Panel for Hints

1. **Automatic Updates:** The ESP-IDF bottom panel automatically updates to display hints based on the errors in your currently opened file.
<br>
<p>
<img src="../../media/tutorials/hints_viewer/bottom_panel.png" alt="Screenshot of bottom panel">
</p>

2. **Manual Search:** You can manually search for hints by copy pasting errors.
<br>
<p>
<img src="../../media/tutorials/hints_viewer/manual_search.gif" alt="Gif of manual search">
</p>
Binary file added media/tutorials/hints/bottom_panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/tutorials/hints/hover.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/tutorials/hints/manual_search.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@
}
],
"viewsContainers": {
"panel": [
{
"id": "espIdfHints",
"title": "ESP-IDF",
"icon": "media/dep.svg"
}
],
"activitybar": [
{
"id": "idfViewController",
Expand All @@ -148,6 +155,13 @@
]
},
"views": {
"espIdfHints": [
{
"id": "errorHints",
"name": "Error Hints",
"title": "Error Hints ($errorHints.count$)"
}
],
"debug": [
{
"name": "%view.debug.peripheral%",
Expand Down Expand Up @@ -206,7 +220,18 @@
}
],
"menus": {
"editor/title": [
{
"command": "espIdf.searchError",
"group": "navigation"
}
],
"view/title": [
{
"command": "espIdf.searchError",
"group": "navigation",
"when": "view == errorHints"
},
{
"command": "espIdf.partition.table.refresh",
"group": "navigation",
Expand Down Expand Up @@ -270,6 +295,9 @@
}
],
"editor/context": [
{
"command": "espIdf.searchError"
},
{
"command": "espIdf.searchInEspIdfDocs",
"group": "navigation",
Expand Down Expand Up @@ -956,6 +984,10 @@
}
],
"commands": [
{
"command": "espIdf.searchError",
"title": "%espIdf.searchError.title%"
},
{
"command": "espIdf.createFiles",
"title": "%espIdf.createFiles.title%",
Expand Down Expand Up @@ -2096,6 +2128,7 @@
"file-loader": "^6.2.0",
"glob": "^7.1.4",
"husky": "^6.0.0",
"js-yaml": "^4.1.0",
"jsonic": "^1.0.1",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^1.23.3",
Expand Down Expand Up @@ -2123,6 +2156,7 @@
},
"dependencies": {
"@vscode/l10n": "^0.0.18",
"@types/js-yaml": "^4.0.5",
"ansi-to-html": "^0.6.11",
"assert": "^2.1.0",
"axios": "^1.6.0",
Expand Down
2 changes: 2 additions & 0 deletions package.nls.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"esp_idf.initGdbCommands.description": "Uno o más comandos GDB para ejecutar con el fin de configurar el depurador subyacente. Ejemplo: \"initGdbCommands\": [ \"target remote /dev/ttyUSB0\"]",
"esp_idf.tmoScaleFactor.description": "Factor de escala para el tiempo de espera de gdb [predeterminado:1]",
"esp_idf.verifyAppBinBeforeDebug.description": "Verificar binarios de la aplicación antes de depurar",
"espIdf.searchError.title": "ESP-IDF: Sugerencia de error de búsqueda",
"idf.flashType.description": "Método de flasheo del dispositivo, UART o JTag",
"idf.wssPort.description": "Puerto del servidor de socket web para Core Dump o GDB Stub",
"openocd.tcl.host.description": "Host para conexión tcl de Openocd",
Expand Down Expand Up @@ -162,6 +163,7 @@
"param.uncoveredDarkTheme": "Color de fondo para líneas no cubiertas en tema oscuro para Cobertura de ESP-IDF.",
"param.uncoveredLightTheme": "Color de fondo para líneas no cubiertas en tema claro para Cobertura de ESP-IDF.",
"param.useIDFKConfigStyle": "Habilitar/Deshabilitar validación de estilo ESP-IDF para archivos Kconfig",
"param.hintsViewer.title": "Ruta al archivo de sugerencias.",
"trace.poll_period.description": "poll_period se establecerá para el rastreo de la aplicación",
"trace.skip_size.description": "skip_size se establecerá para el rastreo de la aplicación",
"trace.stop_tmo.description": "stop_tmo se establecerá para el rastreo de la aplicación",
Expand Down
2 changes: 2 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"esp_idf.initGdbCommands.description": "One or more GDB commands to execute in order to setup the underlying debugger. Example: \"initGdbCommands\": [ \"target remote /dev/ttyUSB0\"]",
"esp_idf.tmoScaleFactor.description": "Scale factor for gdb timeout [default:1]",
"esp_idf.verifyAppBinBeforeDebug.description": "Verify app binaries before debug",
"espIdf.searchError.title": "ESP-IDF: Search Error Hint",
"idf.flashType.description": "Device flash method, UART or JTag",
"idf.wssPort.description": "Web Socket Server Port for Core Dump or GDB Stub",
"openocd.tcl.host.description": "Host for openocd tcl connection",
Expand Down Expand Up @@ -162,6 +163,7 @@
"param.uncoveredDarkTheme": "Background color for uncovered lines in Dark theme for ESP-IDF Coverage.",
"param.uncoveredLightTheme": "Background color for uncovered lines in Light theme for ESP-IDF Coverage.",
"param.useIDFKConfigStyle": "Enable/Disable ESP-IDF style validation for Kconfig files",
"param.hintsViewer.title": "Path to the hints file.",
"trace.poll_period.description": "poll_period will be set for the apptrace",
"trace.skip_size.description": "skip_size will be set for the apptrace",
"trace.stop_tmo.description": "stop_tmo will be set for the apptrace",
Expand Down
2 changes: 2 additions & 0 deletions package.nls.ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"esp_idf.initGdbCommands.description": "Одна или несколько команд GDB, которые необходимо выполнить для настройки базового отладчика. ",
"esp_idf.tmoScaleFactor.description": "Масштабный коэффициент для тайм-аута GDB [по умолчанию: 1]",
"esp_idf.verifyAppBinBeforeDebug.description": "Проверьте двоичные файлы приложения перед отладкой",
"espIdf.searchError.title": "ESP-IDF: Подсказка об ошибке поиска",
"idf.flashType.description": "Метод прошивки устройства, UART или JTag",
"idf.wssPort.description": "Порт веб-сокет-сервера для дампа ядра или заглушки GDB",
"openocd.tcl.host.description": "Хост для подключения openocd tcl",
Expand Down Expand Up @@ -162,6 +163,7 @@
"param.uncoveredDarkTheme": "Цвет фона для непокрытых линий в темной теме для покрытия ESP-IDF.",
"param.uncoveredLightTheme": "Цвет фона для непокрытых линий в светлой теме для покрытия ESP-IDF.",
"param.useIDFKConfigStyle": "Включить/отключить проверку стиля ESP-IDF для файлов Kconfig.",
"param.hintsViewer.title": "Путь к файлу подсказок",
"trace.poll_period.description": "poll_ period будет установлен для apptrace",
"trace.skip_size.description": "Skip_size будет установлен для трассировки приложения.",
"trace.stop_tmo.description": "stop_tmo будет установлен для apptrace",
Expand Down
2 changes: 2 additions & 0 deletions package.nls.zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"esp_idf.initGdbCommands.description": "为设置底层调试器而执行的一个或多个 GDB 命令。示例:“initGdbCommands”:[“target remote /dev/ttyUSB0”]",
"esp_idf.tmoScaleFactor.description": "GDB 超时的缩放因子 [默认值:1]",
"esp_idf.verifyAppBinBeforeDebug.description": "在调试前验证应用程序二进制文件",
"espIdf.searchError.title": "ESP-IDF: 搜索错误提示",
"idf.flashType.description": "设备烧录方法,UART 或 JTag",
"idf.wssPort.description": "用于 Core Dump 或 GDB Stub 的 Web Socket 服务器端口",
"openocd.tcl.host.description": "用于 OpenOCD tcl 连接的主机",
Expand Down Expand Up @@ -162,6 +163,7 @@
"param.uncoveredDarkTheme": "在 ESP-IDF 覆盖率的深色主题中未覆盖的行的背景颜色。",
"param.uncoveredLightTheme": "在 ESP-IDF 覆盖率的浅色主题中未覆盖的行的背景颜色。",
"param.useIDFKConfigStyle": "启用/禁用 Kconfig 文件的 ESP-IDF 样式验证",
"param.hintsViewer.title": "提示文件的路径",
"trace.poll_period.description": "将为 apptrace 设置 poll_period",
"trace.skip_size.description": "将为 apptrace 设置 skip_size",
"trace.stop_tmo.description": "将为 apptrace 设置 stop_tmo",
Expand Down
Loading
Loading