microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C++ CTRL-F5 always hits the invisible `Breakpoint 1, main (argc=1, argv=0x7fffffffd648)` the first time it runs!

khteh opened this issue · comments

Environment

  • OS and version: Ubuntu 24.04
  • VS Code: 1.90.0
  • C/C++ extension: 1.20.5
  • OS and version of remote machine (if applicable):
  • GDB / LLDB version: GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git

Bug Summary and Steps to Reproduce

Bug Summary:
Why the fxxk does it always hit this invisible breakpoint when there is none at all the first time CTRL-F5 is run!?!

=thread-group-added,id="i1"
GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
Stopped due to shared library event (no libraries added or removed)
Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, main (argc=1, argv=0x7fffffffd648) at /usr/src/DataStructuresAlgorithms/Console/Console.cpp:11
11	{
Loaded '/lib/x86_64-linux-gnu/libtbb.so.12'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libstdc++.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libm.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libgcc_s.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libc.so.6'. Symbols loaded.
[New Thread 0x7ffff72006c0 (LWP 69236)]
[New Thread 0x7ffff66006c0 (LWP 69238)]
[New Thread 0x7ffff6c006c0 (LWP 69237)]
[New Thread 0x7ffff5a006c0 (LWP 69240)]
[New Thread 0x7ffff60006c0 (LWP 69239)]
[New Thread 0x7ffff48006c0 (LWP 69243)]
[New Thread 0x7ffff4e006c0 (LWP 69242)]
[New Thread 0x7ffff54006c0 (LWP 69241)]
[New Thread 0x7fffef8006c0 (LWP 69245)]
[New Thread 0x7fffefe006c0 (LWP 69244)]
[New Thread 0x7fffef2006c0 (LWP 69246)]
[New Thread 0x7fffee6006c0 (LWP 69248)]
[New Thread 0x7fffeec006c0 (LWP 69247)]
[New Thread 0x7fffee0006c0 (LWP 69249)]
[New Thread 0x7fffeda006c0 (LWP 69252)]

Steps to reproduce:

  1. In this environment...
  2. With this config...
  3. Do '...'
  4. See error...

Debugger Configurations

settings.json:

{
  "files.associations": {
    "limits": "cpp",
    "vector": "cpp",
    "stdexcept": "cpp",
    "iostream": "cpp",
    "array": "cpp",
    "deque": "cpp",
    "list": "cpp",
    "string": "cpp",
    "unordered_map": "cpp",
    "unordered_set": "cpp",
    "string_view": "cpp",
    "initializer_list": "cpp",
    "regex": "cpp",
    "bitset": "cpp",
    "*.tcc": "cpp",
    "algorithm": "cpp",
    "functional": "cpp",
    "ranges": "cpp",
    "span": "cpp",
    "ostream": "cpp",
    "variant": "cpp",
    "any": "cpp",
    "atomic": "cpp",
    "bit": "cpp",
    "cctype": "cpp",
    "chrono": "cpp",
    "clocale": "cpp",
    "cmath": "cpp",
    "compare": "cpp",
    "concepts": "cpp",
    "condition_variable": "cpp",
    "cstdarg": "cpp",
    "cstddef": "cpp",
    "cstdint": "cpp",
    "cstdio": "cpp",
    "cstdlib": "cpp",
    "cstring": "cpp",
    "ctime": "cpp",
    "cwchar": "cpp",
    "cwctype": "cpp",
    "map": "cpp",
    "set": "cpp",
    "exception": "cpp",
    "iterator": "cpp",
    "memory": "cpp",
    "memory_resource": "cpp",
    "numeric": "cpp",
    "optional": "cpp",
    "random": "cpp",
    "ratio": "cpp",
    "system_error": "cpp",
    "tuple": "cpp",
    "type_traits": "cpp",
    "utility": "cpp",
    "fstream": "cpp",
    "iomanip": "cpp",
    "iosfwd": "cpp",
    "istream": "cpp",
    "mutex": "cpp",
    "new": "cpp",
    "numbers": "cpp",
    "semaphore": "cpp",
    "shared_mutex": "cpp",
    "sstream": "cpp",
    "stop_token": "cpp",
    "streambuf": "cpp",
    "thread": "cpp",
    "cfenv": "cpp",
    "typeinfo": "cpp",
    "format": "cpp",
    "__bit_reference": "cpp",
    "__hash_table": "cpp",
    "__split_buffer": "cpp",
    "__tree": "cpp",
    "filesystem": "cpp",
    "__node_handle": "cpp",
    "queue": "cpp",
    "stack": "cpp",
    "charconv": "cpp",
    "__nullptr": "cpp",
    "__string": "cpp",
    "__locale": "cpp",
    "ios": "cpp",
    "locale": "cpp",
    "target": "cpp",
    "cinttypes": "cpp",
    "__debug": "cpp",
    "__functional_base": "cpp"
  },
  "cmake.configureSettings": {
    "gtest_build_samples": "ON"
  },
  "testMate.cpp.test.advancedExecutables": [
    {
      "pattern": "x64/{Debug,Release}/*{test,Test,TEST}*",
      "gtest": {
        "debug.enableOutputColouring": true
      }
    }
  ],
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": "googletest.failed",
        "settings": {
          "foreground": "#f00"
        }
      },
      {
        "scope": "googletest.passed",
        "settings": {
          "foreground": "#0f0"
        }
      },
      {
        "scope": "googletest.run",
        "settings": {
          "foreground": "#0f0"
        }
      }
    ]
  }
}

Debugger Logs

I don't use launch.json file!

Other Extensions

No response

Additional Information

No response

@khteh I believe we're already tracking this issue with #8011 .