-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data breakpoints / Memory read write interrupts #1410
Comments
If you're using GDB or LLDB as the backend, you can use the DEBUG CONSOLE to add memory watchpoints. The syntax for both is given here, under WATCHPOINT COMMANDS. |
Does this actually work? If I set a watchpoint on macOS (lldb), the debugger just hangs. I'm not sure the MI engine is properly handling the messages.
With engine logging:
|
I haven't tried it recently, but I did have success with it with LLDB on macOS back in August. I know there have been some changes to LLDB/Rust debug support since then. |
The vscode update 1.38 added support for data read/write breakpoints. Would it be now possible to integrate that feature into this extension? |
Am I missing anything? |
Would love to see this feature... |
please, make it real |
I am also using C++ on Windows, using this extension, and I can find no way to set a data breakpoint. The documentation says to look in the VARIABLES section but there is nothing there. Please add it. This is a pretty basic feature missing from the C++ extensions which is awesome in every other way. |
Any plans for this? For C#, extension developers stated that it would only work on Windows so they are not interested in implementing it for VSCode. How is the situation on C/C++ side? |
Following the comment above, in the debug console I do However, there is no UI on the VSCode side, no additional symbols in the breakpoints view, and the code lens(?) at the point where the break occurs I get a red bar "Exception has occurred. Unknown watchpoint", but otherwise everything continues to work. |
I am also getting the "Exception has occurred. Unknown watchpoint". Where you able to find out how to remove this ? |
No, I did not investigate any further. |
This should be available in https://github.com/microsoft/vscode-cpptools/releases/tag/1.8.2 (for GDB debugging). |
Awesome! Thank you for implementing this for GDB. Now please implement it for Visual C++. See #8343 (comment). |
Is it possible to see the code changes perhaps please? Maybe that will help to see how to do it for Visual C++. |
Unless I'm mistaken I don't see this for LLDB either. |
@louisclayton Yes, it's not available for LLDB either, just gdb. We/someone may want to create a new issue to track that? |
|
Is it possible to break when global variables changes? I only see local variables in the side bar. |
Hello,
I'd love to set a "data breakpoint" or "memory breakpoint". Basically, given an address of memory I want the debugger to break if that memory is written. I think in some cases it's even possible to do read breakpoints.
If this is based on GDB (sorry I haven't looked at the code), this might not be too bad.
https://stackoverflow.com/questions/58851/can-i-set-a-breakpoint-on-memory-access-in-gdb
I'm on OS X 10.12.
VSCode Version 1.19.1 (1.19.1)
vscode-cpptools Version 0.14.5
I mainly write C++98 or C++11.
The only other plugin I'm using is CMake.
The text was updated successfully, but these errors were encountered: