简体   繁体   English

在 Visual Studio 代码中调试 C++ 时如何查看变量类型?

[英]How to see variable type while debugging C++ in visual studio code?

While debugging C++ code in Visual Studio Code, is it possible to see type of VARIABLES ?在 Visual Studio Code 中调试 C++ 代码时,是否可以看到 VARIABLES 的类型?

VARIABLES or WATCH view only show variable name with variable value. VARIABLES 或 WATCH 视图仅显示具有变量值的变量名称。 Is there an option to show also variable type ?是否有显示变量类型的选项?

I use GDB from MinGW to compile and debug C codes.我使用 MinGW 的 GDB 来编译和调试 C 代码。

While in debug console, use command -exec ptype variable_name to show types of variable.在调试控制台中,使用命令-exec ptype variable_name显示变量的类型。

Perhaps this site can help: https://docs.microsoft.com/en-us/visualstudio/debugger/watch-and-quickwatch-windows?view=vs-2019也许这个网站可以提供帮助: https ://docs.microsoft.com/en-us/visualstudio/debugger/watch-and-quickwatch-windows?view=vs-2019

As I see here, the variable types are displayed.正如我在这里看到的,显示了变量类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Visual Studio 进行调试时如何查看 C++ 模板参数? - How to see C++ template parameters while debugging with Visual Studio? 在 Visual Studio Code 中调试 C++ 时未命中断点 - Breakpoints not hit while debugging c++ in Visual Studio Code 在 Visual Studio Code 中调试(C++ 程序)时看不到 vector 或其他容器(例如 map)的内容 - Can't see the contents of vector or other containers (e.g map) while debugging (C++ program) in Visual Studio Code 在 Visual Studio Code 中调试 C++ 时如何读取输入? - How to read input when debugging in C++ in Visual Studio Code? 使用Visual Studio代码进行远程调试(C ++) - Remote debugging(c++) with visual studio code 调试基于 Linux 的 C++ 代码 Visual Studio 代码时出现问题 - Issue while debugging Linux based C++ code visual studio code 如何在调试 xamarin android c++ 代码在 Visual Studio 2019 上 ZAEA23489CE3AACDB3640Z 上的 xamarin - How to stop signal SIGPWR, Power fail/restart while debugging xamarin android c++ code in visual studio 2019 on Windows 使用 Visual Studio Code Ubuntu 调试 c++ 代码 - Debugging a c++ code with Visual Studio Code Ubuntu C++:调试时在 VS 代码中看不到 output - C++: cannot see output in VS Code while debugging 使用Visual Studio 2010调试C ++项目时出现问题 - Problem while Debugging a C++ project using Visual Studio 2010
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM