vscode: Breakpoints are not working under macOS Catalina

  • VSCode Version: 1.36.1
  • OS Version: macOS 10.15 Beta (19A512f)

Steps to Reproduce:

  1. Create hello.js
  2. Set breakpoint on first line
  3. Launch under debugger

Does this issue occur when all extensions are disabled?: Yes

hello.js:

console.log('Hello');

launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceFolder}/hello.js",
    }
  ]
}

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 66 (29 by maintainers)

Most upvoted comments

I have the same issue when debugging cpp in macOS Catalina. I use clang++, lldb in tasks.json and launch.json

Version information

> sw_vers ProductName: Mac OS X ProductVersion: 10.15.1 BuildVersion: 19B88

> clang++ --version Apple clang version 11.0.0 (clang-1100.0.33.12) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin > lldb --version lldb-1100.0.30.6 Apple Swift version 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9)

> code --version 1.40.1 8795a9889db74563ddd43eb0a897a2384129a619 x64

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "clang++ build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "lldb",
            "preLaunchTask": "clang++ build active file"
        }
    ]
}

tasks.json

{
    "tasks": [
        {
            "type": "shell",
            "label": "clang++ build active file",
            "command": "/usr/bin/clang++",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "options": {
                "cwd": "/usr/bin"
            }
        }
    ],
    "version": "2.0.0"
}

This is not only related to node projects. I’ve got the same problem when trying to debug compiled C programs.

I’m running macOS Catalina 10.15.1 and vscode 1.40.0.

I get the same result as @BryanHunt when checking the directories.

Since we have a new debugger, please let us know if you’re still running into this problem, and if so please open an issue on that repo.

@popmonkey please file an issue against the Python extension. This bug is for node.js only.

I have the same issue when debugging cpp in macOS Catalina. I use clang++, lldb in tasks.json and launch.json

Version information

> sw_vers ProductName: Mac OS X ProductVersion: 10.15.1 BuildVersion: 19B88 > clang++ --version Apple clang version 11.0.0 (clang-1100.0.33.12) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin > lldb --version lldb-1100.0.30.6 Apple Swift version 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9) > code --version 1.40.1 8795a9889db74563ddd43eb0a897a2384129a619 x64

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "clang++ build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "lldb",
            "preLaunchTask": "clang++ build active file"
        }
    ]
}

tasks.json

{
    "tasks": [
        {
            "type": "shell",
            "label": "clang++ build active file",
            "command": "/usr/bin/clang++",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "options": {
                "cwd": "/usr/bin"
            }
        }
    ],
    "version": "2.0.0"
}

have you already fix this bug?

There is a workaround in the cpptools issue. You can use extension CodeLLDB for CPP debugging, this can work for me.