Visual Studio代码C++ :如何在手表/当地人中显示类型和地址
我最近改用了C ++编程的Visual Studio代码。
我现在面临着一个相当讨厌的错误(一些访问释放的内存),因此我需要更多地详细介绍记忆中的位置。
如果调试时,在手表/当地人中,我可以“自动”显示变量的类型和地址,这将很有帮助。您知道是否有解决方案?
目前,对于地址,我发现我可以用“& my_variable”创建一款新手表,但是如果我必须为每个变量进行操作,那就很耗时。如果可以始终显示,它会更好,或者至少有一个选项,例如“左键单击/显示地址”。如果您有一个仅适用于对象和/或数组的解决方案,那已经是向前迈出的一大步。
PS:平台:Linux(Xubuntu 20.4); Visual Code Studio v1.66.0;调试器:GDB
I recently switched to Visual Studio Code for C++ programming.
I'm now facing a rather nasty bug (some accesses to freed memory), so I need to look more into detail into what is where in memory.
It would help a lot if when debugging, in the watches/locals, I could display the type and address of variables "automatically". Do you know if there is some solution?
For now, for the addresses, I found I can create a new watch with "&my_variable", but that's quite time consuming if I have to do it for every variable. It would be nicer if it could be always displayed, or at least if there were an option like "left click/display address". If you have a solution working for just objects and/or arrays, it would already be a big step forwards.
PS : platform : linux(xubuntu 20.4); visual code studio v1.66.0 ; debugger : gdb
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论