如何在visual studio 2010中调试时获取隐藏类型的boost :: variant变量?

时间:2016-03-31 08:44:34

标签: c++ visual-studio-2010 debugging boost visual-studio-debugging

我有一个变量m_Value

boost::variant< int64_t, float64_t, std::string > m_Value

我想在调试时获取隐藏类型:是int64_t还是float64_t还是std :: string?

不幸的是,我无法在Visual Studio的“Locals”窗口中的变量描述中找到它(见下文)。你知道它在哪里显示吗?

enter image description here

1 个答案:

答案 0 :(得分:3)

这里有调试可视化工具:https://github.com/KindDragon/CPPDebuggerVisualizers,它包括对boost类型的支持:

  • boost::shared_ptrboost::weak_ptrboost::intrusive_ptr
  • boost::shared_arrayboost::scoped_ptrboost::scoped_array
  • boost::ptr_arrayboost::ptr_vectorboost::ptr_list
  • boost::ptr_dequeboost::ptr_mapboost::ptr_set
  • boost::ptr_multimapboost::ptr_multiset boost::array
  • boost::dynamic_bitsetboost::circular_buffer boost::unordered_map
  • boost::unordered_setboost::unordered_multimap
  • boost::unordered_multisetboost::intrusive::list
  • boost::intrusive::slistboost::intrusive::set
  • boost::container::basic_stringboost::container::deque
  • boost::container::vector boost::optionalboost::anyboost::variant
  • boost::filesystem::pathboost::filesystem::directory_entry
  • boost::filesystem::file_status boost::posix_time::ptime
  • boost::posix_time::time_duration boost::multiprecision
  • boost::rational boost::regex boost::interprocess::offset_ptr
  • boost::tribool boost::unique_lock boost::uuids::uuid