Skip to content

breakpoint not working #11372

@chenjintang-shrimp

Description

@chenjintang-shrimp

Environment

  • OS and version:
  • Windows 11 22H2
  • VS Code:
  • version 1.81.1 (user setup)
    commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
    date: 2023-08-09T22:22:42.175Z
    Electron: 22.3.18
    ElectronBuildId: 22689846
    Chromium: 108.0.5359.215
    Node.js: 16.17.1
    V8: 10.8.168.25-electron.0
    OS: Windows_NT x64 10.0.22621
  • C/C++ extension:
  • Better C++ Syntax
  • C/C++
  • C/C++ Extension Pack
  • etc.
  • GDB / LLDB version:
  • g++ (GCC) 11.4.0
  • GNU gdb (GDB) (Cygwin 12.1-1) 12.1

Bug Summary and Steps to Reproduce

Bug Summary:
image
breakpoint not working
Steps to reproduce:

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

Debugger Configurations

tasks.json:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "C:/cygwin64/bin/g++.exe",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}.exe"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "options": {
                "cwd": "C:/cygwin64/bin" // 设置任务的工作目录
            }
        },
        {
            "label": "clean",
            "type": "shell",
            "command": "rm",
            "args": [
                "-f",
                "${fileDirname}/${fileBasenameNoExtension}.exe"
            ],
            "group": {
                "kind": "build",
                "isDefault": false
            }
        }
    ]
}

launch.json:
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "C++ Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "miDebuggerPath": "C:/cygwin64/bin/gdb.exe",
            "preLaunchTask": "build",
            // "postDebugTask": "clean",
            // "miDebuggerArgs": "-exec-run",
            // "stopOnError": true,
            // "runtimeArgs": [],
            // "runtimeExecutable": null,
            // "programPath": "${workspaceFolder}/build/${fileBasenameNoExtension}",
            "windows": {
                "program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
                "MIMode": "gdb",
                "setupCommands": [
                    {
                        "description": "Enable pretty-printing for gdb",
                        "text": "-enable-pretty-printing",
                        "ignoreFailures": true
                    }
                ],
                "miDebuggerPath": "C:/cygwin64/bin/gdb.exe",
                // "stopOnError": true,
                // "runtimeArgs": [],
                // "runtimeExecutable": null
            }
        }
    ]
}

Debugger Logs

wait

Other Extensions

nothing

Additional Information

nothing

Metadata

Metadata

Assignees

No one assigned

    Labels

    debuggerinvestigate: reproThis issue's repro steps needs to be investigated/confirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions