diff --git a/for_debug/msvc.png b/for_debug/msvc.png new file mode 100644 index 0000000..2f5ead6 Binary files /dev/null and b/for_debug/msvc.png differ diff --git a/for_debug/readme.md b/for_debug/readme.md index b754951..81d1daa 100644 --- a/for_debug/readme.md +++ b/for_debug/readme.md @@ -1,13 +1,16 @@ # simstr Objects in Debuggers -[On Russian|По-русски](readme_ru.md) +[On Russian | По-русски](readme_ru.md) Two files have been prepared for more convenient display of simstr objects in msvc and gdb debuggers: -simstr.natvis - for use in the MSVC debugger, and simstr_pretty_print.py for working with gdb. +`simstr.natvis` - for use in the MSVC debugger, and `simstr_pretty_print.py` for working with gdb. # simstr Objects in Debuggers +### Visual Studio If you are working in MS Visual Studio, simstr.natvis is automatically added to the pdb file, and provides convenient viewing of simstr string objects wherever this library is used. +![MSVC](msvc.png) + # simstr Objects in Visual Studio Code ## When working in gdb In the debugger configuration, you need to add the following lines: @@ -56,6 +59,9 @@ In this case, the settings for connecting the script are written in `.vscode/set } ``` +### Result +![VSC+gdb](vsc_gdb.png) + If you are working with the MSVC debugger in Visual Studio Code, that is, in launch.json `"type": "cppvsdbg"`, then the setting is different: ``` "configurations": [ diff --git a/for_debug/readme_ru.md b/for_debug/readme_ru.md index 2960da3..93a5f6f 100644 --- a/for_debug/readme_ru.md +++ b/for_debug/readme_ru.md @@ -1,13 +1,17 @@ # Объекты simstr в отладчиках -[On English|По-английски](readme.md) +[On English | По-английски](readme.md) Для более удобного отображения объектов simstr в отладчиках msvc и gdb подготовлено два файла: simstr.natvis - для использования в отладчике MSVC, и simstr_pretty_print.py для работы с gdb. # Объекты simstr в отладчиках + +### Visual Studio Если вы работаете в MS Visual Studio simstr.natvis автоматически добавляется в pdb файл, и обеспечивает удобный просмотр строковых объектов simstr везде, где используется эта библиотека. +![MSVC](msvc.png) + # Объекты simstr в Visual Studio Code ## При работе в gdb В конфигурации отладчика необходимо добавить следующие строки: @@ -56,6 +60,8 @@ simstr.natvis - для использования в отладчике MSVC, и ] } ``` +### Результат +![VSC+gdb](vsc_gdb.png) Если же в Visual Studio Code вы работаете с отладчиком MSVC, то есть в launch.json `"type": "cppvsdbg"` то настройка другая: ``` diff --git a/for_debug/vsc_gdb.png b/for_debug/vsc_gdb.png new file mode 100644 index 0000000..80adb50 Binary files /dev/null and b/for_debug/vsc_gdb.png differ diff --git a/readme.md b/readme.md index 53f0a4e..6aad1de 100644 --- a/readme.md +++ b/readme.md @@ -76,6 +76,10 @@ it is downloaded automatically). The work was tested under Windows on MSVC-19 and Clang-19, under Linux - on GCC-13 and Clang-21. The work in WASM was also tested, built in Emscripten 4.0.6, Clang-21. +## Convenient debugging +Along with the library, two files are supplied that allow viewing simstr string objects in debuggers +more convenient.\ +It is described in more detail in [here](for_debug/readme.md). ## Benchmarks Benchmarks are performed using the [Google benchmark](https://github.com/google/benchmark) framework. diff --git a/readme_ru.md b/readme_ru.md index 2d852dc..d70188c 100644 --- a/readme_ru.md +++ b/readme_ru.md @@ -76,6 +76,11 @@ Работа проверялась под Windows на MSVC-19 и Clang-19, под Linux - на GCC-13 и Clang-21. Также проверялась работа в WASM, сборка в Emscripten 4.0.6, Clang-21. +## Удобная отладка +Вместе с библиотекой поставляются два файла, делающие просмотр simstr строковых объектов в отладчиках +более удобным.\ +Более подробно описано [здесь](for_debug/readme_ru.md). + ## Бенчмарки Бенчмарки производятся с использованием фреймворка [Google benchmark](https://github.com/google/benchmark).