Skip to content
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

C++ debugging can execute code due to mouse hovering over code #12998

Open
unpacklo opened this issue Nov 25, 2024 · 3 comments
Open

C++ debugging can execute code due to mouse hovering over code #12998

unpacklo opened this issue Nov 25, 2024 · 3 comments
Labels
debugger help wanted Can be fixed in the public (open source) repo.

Comments

@unpacklo
Copy link

Type: Bug

When debugging C++ code it's possible to be sitting at a break point and the mouse hovering over a function can cause it to execute. This can unintentionally break debugging sessions due to unintended mouse movements.

Extension version: 1.22.11
VS Code version: Code 1.95.3 (Universal) (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Darwin x64 24.1.0
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 3, 3, 3
Memory (System) 32.00GB (0.81GB free)
Process Argv --crash-reporter-id 8c20af22-84b8-464e-8717-df6dc863ae10
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
f3je6385:31013174
dvdeprecation:31068756
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530

@unpacklo
Copy link
Author

This code can illustrate the bug:

#include <cstdio>

struct incrementer
{
    int i = 0;

    int increment()
    {
        return i++;
    }
};

int main()
{
    incrementer i;
    i.increment(); // Set breakpoint here, then hover mouse over "increment()", watch i.i change value.
    printf("%d\n", i.i);
    i.increment();
    return 0;
}

@sean-mcmanus sean-mcmanus added debugger help wanted Can be fixed in the public (open source) repo. labels Nov 25, 2024
@sean-mcmanus
Copy link
Contributor

@unpacklo Is this with gdb or lldb?

@unpacklo
Copy link
Author

@sean-mcmanus I'm using lldb on macos.

lldb --version tells me:

lldb-1600.0.39.3
Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugger help wanted Can be fixed in the public (open source) repo.
Projects
None yet
Development

No branches or pull requests

2 participants