[英]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.