根据这个stackoverflow post上的回答,在 Visual Studio 中,调试器监 window 口可以使用以下语法显示数组的多个值:arrName,20
。
是否有类似的方法可以轻松地在 Visual Studio Code 调试器中显示指针和以下内存地址的多个值?
例如,这是我正在使用的结构:
struct student *students = malloc(NUM_STUDENTS * sizeof *students);
我可以使用 students[idx]
显示单个值,但尝试使用给定的 Visual Studio 语法不起作用。
最佳答案
你可以在vs代码监视器中使用*some_pointer@3来显示指针指向的值。
关于c - 如何在 Visual Studio Code 调试器中轻松显示指针的多个值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48336905/