oneTBB
oneTBB copied to clipboard
Add debugger visualization Natvis file for TBB types
The PR adds debugger visualization Natvis file for several TBB types, this makes debugging easier and more visible for developers. Can be used in Microsoft Visual Studio and Visual Studio Code.
Check "Natvis File Location" paragraph to choose the preferred location of the natvis file, after this the debugger will pick it up automatically: https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects?view=vs-2019#BKMK_natvis_location .
Signed-off-by: Anna Keba [email protected]
Visualizations implemented for the following types:
- tbb::combinable
- tbb::enumerable_thread_specific
- tbb::concurrent_vector
- tbb::concurrent_unordered_set
Usage examples:
'tbb::combinable' with visualization:
'tbb::combinable' with default view:
'tbb::enumerable_thread_specific' with visualization:
'tbb::enumerable_thread_specific' with default view:
'tbb::concurrent_vector' with visualization:
'tbb::concurrent_vector' with default view:
'tbb::concurrent_unordered_set' with visualization:
'tbb::concurrent_unordered_set' with default view:
Visualizations for empty objects:
Does it integrates to VS automatically or some steps are required?
Does it integrates to VS automatically or some steps are required?
The debugger will pick it up automatically as long as the file is in one of the locations described in the link, you can choose the preferred option: https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects?view=vs-2019#BKMK_natvis_location . I've added this into the description as well. @alexey-katranov
@alexey-katranov @anton-potapov Could you please take a look if you're happy with the changes, answered to your question above.
@AnnaKeba,
Sorry for the late response.
Thank you for your contribution! We have looked into the functionality you describe and found that it relies on the internal details of oneTBB classes (field and function names, etc.). These details can change in the future oneTBB releases and make Natvis files outdated.
This PR can be merged to oneTBB master
but the corresponding Natvis file update in case of some internal details change cannot be guaranteed. Some additional PRs can be required in the future to keep Natvis files up-to-date.