Type: Debugger
debugger doesn't hit breakpoint in my c++ "helloworld" programe , same code and config file works fine in my another windows laptop
Describe the bug
task.json:
{
"version": "2.0.0",
"command": "g++",
"args": ["-g","${file}","-o","${fileBasenameNoExtension}.exe","-v"],
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true, //this will call a dos prompt window for cin and cout
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGWx64\\gcc\\bin\\gdb.exe",
"preLaunchTask": "g++", //this must same as command in task.json
"logging": {"trace": true, "traceResponse": true,
"engineLogging": true,
"exceptions": true,
"moduleLoad": true,
"programOutput": true},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
c_cpp_properties.json:
{
"configurations": [
{
"name": "MinGw",
"includePath": [
"${workspaceFolder}/**",
"${workspaceRoot}",
"C:\\MinGWx64\\gcc\\include\\c++\\8.2.0",
"C:\\MinGWx64\\gcc\\x86_64-w64-mingw32\\include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:\\MinGWx64\\gcc\\bin\\gcc.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
debug logs:
--> E (output): {"event":"output","body":{"category":"console","output":"1: (144) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'\r\n"},"seq":2,"type":"event"}
1: (144) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'
--> E (output): {"event":"output","body":{"category":"console","output":"1: (161) LaunchOptions ExePath='C:\\Users\\natha\\Seafile\\CDmyCompany\\cpp_study\\myCode\\c_primer.exe'\r\n"},"seq":4,"type":"event"}
1: (161) LaunchOptions ExePath='C:\Users\natha\Seafile\CDmyCompany\cpp_study\myCode\c_primer.exe'
--> E (output): {"event":"output","body":{"category":"console","output":"1: (162) LaunchOptions WorkingDirectory='C:\\Users\\natha\\Seafile\\CDmyCompany\\cpp_study\\myCode'\r\n"},"seq":6,"type":"event"}
1: (162) LaunchOptions WorkingDirectory='C:\Users\natha\Seafile\CDmyCompany\cpp_study\myCode'
--> E (output): {"event":"output","body":{"category":"console","output":"1: (162) LaunchOptions ExeArguments=''\r\n"},"seq":8,"type":"event"}
1: (162) LaunchOptions ExeArguments=''
--> E (output): {"event":"output","body":{"category":"console","output":"1: (162) LaunchOptions MIMode='gdb'\r\n"},"seq":10,"type":"event"}
1: (162) LaunchOptions MIMode='gdb'
--> E (output): {"event":"output","body":{"category":"console","output":"1: (164) LaunchOptions MIDebuggerPath='C:\\MinGWx64\\gcc\\bin\\gdb.exe'\r\n"},"seq":12,"type":"event"}
1: (164) LaunchOptions MIDebuggerPath='C:\MinGWx64\gcc\bin\gdb.exe'
--> E (output): {"event":"output","body":{"category":"console","output":"1: (164) LaunchOptions WaitDynamicLibLoad='false'\r\n"},"seq":14,"type":"event"}
1: (164) LaunchOptions WaitDynamicLibLoad='false'
--> E (output): {"event":"output","body":{"category":"console","output":"1: (164) LaunchOptions ExternalConsole='true'\r\n"},"seq":16,"type":"event"}
1: (164) LaunchOptions ExternalConsole='true'
--> E (output): {"event":"output","body":{"category":"console","output":"1: (165) LaunchOptions>\r\n"},"seq":18,"type":"event"}
1: (165) LaunchOptions>
--> E (output): {"event":"output","body":{"category":"console","output":"1: (165) LaunchOptions <SetupCommands>\r\n"},"seq":20,"type":"event"}
1: (165) LaunchOptions <SetupCommands>
--> E (output): {"event":"output","body":{"category":"console","output":"1: (165) LaunchOptions <Command IgnoreFailures='true' Description='Enable pretty-printing for gdb'>-enable-pretty-printing</Command>\r\n"},"seq":22,"type":"event"}
1: (165) LaunchOptions <Command IgnoreFailures='true' Description='Enable pretty-printing for gdb'>-enable-pretty-printing</Command>
--> E (output): {"event":"output","body":{"category":"console","output":"1: (165) LaunchOptions </SetupCommands>\r\n"},"seq":24,"type":"event"}
1: (165) LaunchOptions </SetupCommands>
--> E (output): {"event":"output","body":{"category":"console","output":"1: (167) LaunchOptions</LocalLaunchOptions>\r\n"},"seq":26,"type":"event"}
1: (167) LaunchOptions</LocalLaunchOptions>
--> E (output): {"event":"output","body":{"category":"console","output":"1: (232) Starting: \"C:\\MinGWx64\\gcc\\bin\\gdb.exe\" --interpreter=mi\r\n"},"seq":28,"type":"event"}
1: (232) Starting: "C:\MinGWx64\gcc\bin\gdb.exe" --interpreter=mi
--> E (output): {"event":"output","body":{"category":"console","output":"1: (681) DebuggerPid=11788\r\n"},"seq":30,"type":"event"}
1: (681) DebuggerPid=11788
--> E (output): {"event":"output","body":{"category":"console","output":"1: (721) ->=thread-group-added,id=\"i1\"\r\n"},"seq":32,"type":"event"}
1: (721) ->=thread-group-added,id="i1"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (722) ->~\"This binary was built by Equation Solution <http://www.Equation.com>.\\n\"\r\n"},"seq":34,"type":"event"}
1: (722) ->~"This binary was built by Equation Solution <http://www.Equation.com>.\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (722) ->~\"GNU gdb (GDB) 7.12\\n\"\r\n"},"seq":36,"type":"event"}
1: (722) ->~"GNU gdb (GDB) 7.12\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (722) ->~\"Copyright (C) 2016 Free Software Foundation, Inc.\\n\"\r\n"},"seq":38,"type":"event"}
1: (722) ->~"Copyright (C) 2016 Free Software Foundation, Inc.\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (723) ->~\"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\\nThis is free software: you are free to change and redistribute it.\\nThere is NO WARRANTY, to the extent permitted by law. Type \\\"show copying\\\"\\nand \\\"show warranty\\\" for details.\\n\"\r\n"},"seq":40,"type":"event"}
1: (723) ->~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (723) ->~\"This GDB was configured as \\\"x86_64-w64-mingw32\\\".\\nType \\\"show configuration\\\" for configuration details.\"\r\n"},"seq":42,"type":"event"}
1: (723) ->~"This GDB was configured as \"x86_64-w64-mingw32\".\nType \"show configuration\" for configuration details."
--> E (output): {"event":"output","body":{"category":"console","output":"1: (723) ->~\"\\nFor bug reporting instructions, please see:\\n\"\r\n"},"seq":44,"type":"event"}
1: (723) ->~"\nFor bug reporting instructions, please see:\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (724) ->~\"<http://www.gnu.org/software/gdb/bugs/>.\\n\"\r\n"},"seq":46,"type":"event"}
1: (724) ->~"<http://www.gnu.org/software/gdb/bugs/>.\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (724) ->~\"Find the GDB manual and other documentation resources online at:\\n<http://www.gnu.org/software/gdb/documentation/>.\\n\"\r\n"},"seq":48,"type":"event"}
1: (724) ->~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (724) ->~\"For help, type \\\"help\\\".\\n\"\r\n"},"seq":50,"type":"event"}
1: (724) ->~"For help, type \"help\".\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (724) ->~\"Type \\\"apropos word\\\" to search for commands related to \\\"word\\\".\\n\"\r\n"},"seq":52,"type":"event"}
1: (724) ->~"Type \"apropos word\" to search for commands related to \"word\".\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (725) ->(gdb)\r\n"},"seq":54,"type":"event"}
1: (725) ->(gdb)
--> E (output): {"event":"output","body":{"category":"console","output":"1: (730) <-1001-gdb-set target-async on\r\n"},"seq":56,"type":"event"}
1: (730) <-1001-gdb-set target-async on
--> E (output): {"event":"output","body":{"category":"console","output":"1: (730) ->&\"\\357\\273\\2771001-gdb-set target-async on\\n\"\r\n"},"seq":58,"type":"event"}
1: (730) ->&"\357\273\2771001-gdb-set target-async on\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (731) ->&\"Undefined command: \\\"\\357\\\". Try \\\"help\\\".\\n\"\r\n"},"seq":60,"type":"event"}
1: (731) ->&"Undefined command: \"\357\". Try \"help\".\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (731) ->^error,msg=\"Undefined command: \\\"\\357\\\". Try \\\"help\\\".\"\r\n"},"seq":62,"type":"event"}
1: (731) ->^error,msg="Undefined command: \"\357\". Try \"help\"."
--> E (output): {"event":"output","body":{"category":"console","output":"1: (732) ->(gdb)\r\n"},"seq":64,"type":"event"}
1: (732) ->(gdb)
--> E (output): {"event":"output","body":{"category":"console","output":"1: (732) ->&\"\\n\"\r\n"},"seq":66,"type":"event"}
1: (732) ->&"\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (732) ->^done\r\n"},"seq":68,"type":"event"}
1: (732) ->^done
--> E (output): {"event":"output","body":{"category":"console","output":"1: (733) ->(gdb)\r\n"},"seq":70,"type":"event"}
1: (733) ->(gdb)
From the engine logs, I do not see any breakpoints being set. Do you have a sample C++ project I could recreate your issue with?
https://youtu.be/VbdkDwr3dIM
my code:
# include <iostream>
# include <string>
using namespace std;
int main() {
cout << "hello world!! " <<endl;
system("pause");
return 0;
}
break point set at cout .
Maybe this helps somebody.
I had the following in the logs:
--> E (breakpoint): {"event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":1,"verified":false,"message":"Module containing this breakpoint has not yet loaded or the breakpoint address could not be obtained.","line":122}},"seq":184,"type":"event"}
--> E (breakpoint): {"event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":2,"verified":false,"message":"Module containing this breakpoint has not yet loaded or the breakpoint address could not be obtained.","line":129}},"seq":186,"type":"event"}
--> E (breakpoint): {"event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":3,"verified":false,"message":"Module containing this breakpoint has not yet loaded or the breakpoint address could not be obtained.","line":131}},"seq":188,"type":"event"}
I did have -g in the command line, but it was in the wrong order as I had a whole bunch of llvm-config entries with LLVM being built as a release. Once I moved my -g in the proper order (after llvm-config --cxxflags), made clean and rebuilt, the gdb debugger came alive. I'll try with lldb, both stock and extension now.
When in doubt:
-g.@nathanzh your error in the log looks like #1527. The workaround is to disable unicode support in the Windows Codepage setting.
--> E (output): {"event":"output","body":{"category":"console","output":"1: (730) ->&\"\\357\\273\\2771001-gdb-set target-async on\\n\"\r\n"},"seq":58,"type":"event"}
1: (730) ->&"\357\273\2771001-gdb-set target-async on\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (731) ->&\"Undefined command: \\\"\\357\\\". Try \\\"help\\\".\\n\"\r\n"},"seq":60,"type":"event"}
1: (731) ->&"Undefined command: \"\357\". Try \"help\".\n"
--> E (output): {"event":"output","body":{"category":"console","output":"1: (731) ->^error,msg=\"Undefined command: \\\"\\357\\\". Try \\\"help\\\".\"\r\n"},"seq":62,"type":"event"}
1: (731) ->^error,msg="Undefined command: \"\357\". Try \"help\"."
@pieandcakes
OK, Will try it and update you the result.
@pieandcakes
I am having a similar problem but I am definitely using the -g flag. Here is my code and logs.
my configuration:
macOS 10.15 Catalina
VS Code 1.39.2
The problem I am having is that I can't get the debugger to stop at a breakpoint. Here is a screen recording for a simple walkthrough of what I am seeing.

helloworld.cpp:
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main(int argc, char ** argv)
{
vector<string> msg {"Hello", "C++", "World", "from", "VS Code!"};
for (const string& word : msg)
{
cout << word << " ";
}
cout << endl;
}
c_cpp_properties.json:
{
"configurations": [
{
"name": "macOS",
"includePath": ["${workspaceFolder}/**"],
"defines": [],
"macFrameworkPath": ["/System/Library/Frameworks", "/Library/Frameworks"],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "${default}"
}
],
"version": 4
}
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/helloworld.out",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "lldb",
"logging": {
"trace": true,
"traceResponse": true,
"engineLogging": true
}
}
]
}
tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "Build with Clang",
"type": "shell",
"command": "clang++",
"args": [
"--debug",
"-std=c++17",
"-stdlib=libc++",
"helloworld.cpp",
"-o",
"helloworld.out"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
debug logs:
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (267) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'\n"},"seq":2}
1: (267) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (288) LaunchOptions ExePath='/Users/evansmith/Documents/CS_142_TA/test/helloworld.out'\n"},"seq":4}
1: (288) LaunchOptions ExePath='/Users/evansmith/Documents/CS_142_TA/test/helloworld.out'
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (288) LaunchOptions WorkingDirectory='/Users/evansmith/Documents/CS_142_TA/test'\n"},"seq":6}
1: (288) LaunchOptions WorkingDirectory='/Users/evansmith/Documents/CS_142_TA/test'
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (288) LaunchOptions ExeArguments=''\n"},"seq":8}
1: (288) LaunchOptions ExeArguments=''
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (288) LaunchOptions MIMode='lldb'\n"},"seq":10}
1: (288) LaunchOptions MIMode='lldb'
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (289) LaunchOptions MIDebuggerPath='/Users/evansmith/.vscode/extensions/ms-vscode.cpptools-0.26.0/debugAdapters/lldb/bin/lldb-mi'\n"},"seq":12}
1: (289) LaunchOptions MIDebuggerPath='/Users/evansmith/.vscode/extensions/ms-vscode.cpptools-0.26.0/debugAdapters/lldb/bin/lldb-mi'
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (289) LaunchOptions WaitDynamicLibLoad='false'\n"},"seq":14}
1: (289) LaunchOptions WaitDynamicLibLoad='false'
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (290) LaunchOptions ExternalConsole='true'\n"},"seq":16}
1: (290) LaunchOptions ExternalConsole='true'
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (290) LaunchOptions>\n"},"seq":18}
1: (290) LaunchOptions>
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (290) LaunchOptions</LocalLaunchOptions>\n"},"seq":20}
1: (290) LaunchOptions</LocalLaunchOptions>
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (500) Starting: \"/Users/evansmith/.vscode/extensions/ms-vscode.cpptools-0.26.0/debugAdapters/lldb/bin/lldb-mi\" --interpreter=mi\n"},"seq":22}
1: (500) Starting: "/Users/evansmith/.vscode/extensions/ms-vscode.cpptools-0.26.0/debugAdapters/lldb/bin/lldb-mi" --interpreter=mi
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (564) DebuggerPid=13205\n"},"seq":24}
1: (564) DebuggerPid=13205
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1086) ->(gdb)\n"},"seq":26}
1: (1086) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1106) <-1001-gdb-set auto-solib-add on\n"},"seq":28}
1: (1106) <-1001-gdb-set auto-solib-add on
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1106) ->1001^done\n"},"seq":30}
1: (1106) ->1001^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1107) ->(gdb)\n"},"seq":32}
1: (1107) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1111) 1001: elapsed time 6\n"},"seq":34}
1: (1111) 1001: elapsed time 6
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1112) <-1002-gdb-set solib-search-path \"/Users/evansmith/Documents/CS_142_TA/test:\"\n"},"seq":36}
1: (1112) <-1002-gdb-set solib-search-path "/Users/evansmith/Documents/CS_142_TA/test:"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1113) ->1002^done\n"},"seq":38}
1: (1113) ->1002^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1113) 1002: elapsed time 0\n"},"seq":40}
1: (1113) 1002: elapsed time 0
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1113) <-1003-environment-cd /Users/evansmith/Documents/CS_142_TA/test\n"},"seq":42}
1: (1113) <-1003-environment-cd /Users/evansmith/Documents/CS_142_TA/test
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1114) ->(gdb)\n"},"seq":44}
1: (1114) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1115) ->1003^done,path=\"/Users/evansmith/Documents/CS_142_TA/test\"\n"},"seq":46}
1: (1115) ->1003^done,path="/Users/evansmith/Documents/CS_142_TA/test"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1117) ->(gdb)\n"},"seq":48}
1: (1117) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1120) 1003: elapsed time 6\n"},"seq":50}
1: (1120) 1003: elapsed time 6
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1120) <-1004-gdb-set new-console on\n"},"seq":52}
1: (1120) <-1004-gdb-set new-console on
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1120) ->1004^done\n"},"seq":54}
1: (1120) ->1004^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1121) 1004: elapsed time 0\n"},"seq":56}
1: (1121) 1004: elapsed time 0
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1121) ->(gdb)\n"},"seq":58}
1: (1121) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1121) <-1005-file-exec-and-symbols /Users/evansmith/Documents/CS_142_TA/test/helloworld.out\n"},"seq":60}
1: (1121) <-1005-file-exec-and-symbols /Users/evansmith/Documents/CS_142_TA/test/helloworld.out
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1316) ->1005^done\n"},"seq":62}
1: (1316) ->1005^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1317) 1005: elapsed time 195\n"},"seq":64}
1: (1317) 1005: elapsed time 195
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1317) ->(gdb)\n"},"seq":66}
1: (1317) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1317) ->=library-loaded,id=\"/Users/evansmith/Documents/CS_142_TA/test/helloworld.out\",target-name=\"/Users/evansmith/Documents/CS_142_TA/test/helloworld.out\",host-name=\"/Users/evansmith/Documents/CS_142_TA/test/helloworld.out\",symbols-loaded=\"1\",symbols-path=\"/System/Volumes/Data/Users/evansmith/Documents/CS_142_TA/test/helloworld.out.dSYM/Contents/Resources/DWARF/helloworld.out\",loaded_addr=\"-\",size=\"12288\"\n"},"seq":68}
1: (1317) ->=library-loaded,id="/Users/evansmith/Documents/CS_142_TA/test/helloworld.out",target-name="/Users/evansmith/Documents/CS_142_TA/test/helloworld.out",host-name="/Users/evansmith/Documents/CS_142_TA/test/helloworld.out",symbols-loaded="1",symbols-path="/System/Volumes/Data/Users/evansmith/Documents/CS_142_TA/test/helloworld.out.dSYM/Contents/Resources/DWARF/helloworld.out",loaded_addr="-",size="12288"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1319) <-1006-interpreter-exec console \"platform status\"\n"},"seq":70}
1: (1319) <-1006-interpreter-exec console "platform status"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1320) -> Platform: host\n"},"seq":72}
1: (1320) -> Platform: host
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1321) -> Triple: x86_64h-apple-macosx\n"},"seq":74}
1: (1321) -> Triple: x86_64h-apple-macosx
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1321) ->OS Version: 10.15 (19A602)\n"},"seq":76}
1: (1321) ->OS Version: 10.15 (19A602)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1321) -> Kernel: Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64\n"},"seq":78}
1: (1321) -> Kernel: Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1321) -> Hostname: 127.0.0.1\n"},"seq":80}
1: (1321) -> Hostname: 127.0.0.1
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1322) ->WorkingDir: /Users/evansmith/Documents/CS_142_TA/test\n"},"seq":82}
1: (1322) ->WorkingDir: /Users/evansmith/Documents/CS_142_TA/test
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1322) ->1006^done\n"},"seq":84}
1: (1322) ->1006^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1322) ->(gdb)\n"},"seq":86}
1: (1322) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1325) 1006: elapsed time 5\n"},"seq":88}
1: (1325) 1006: elapsed time 5
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1326) <-1007-break-insert -f on main\n"},"seq":90}
1: (1326) <-1007-break-insert -f on main
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1330) ->1007^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00000001000007b4\",func=\"main\",file=\"helloworld.cpp\",fullname=\"/Users/evansmith/Documents/CS_142_TA/test/helloworld.cpp\",line=\"10\",pending=[\"main\"],times=\"0\",original-location=\"main\"}\n"},"seq":92}
1: (1330) ->1007^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00000001000007b4",func="main",file="helloworld.cpp",fullname="/Users/evansmith/Documents/CS_142_TA/test/helloworld.cpp",line="10",pending=["main"],times="0",original-location="main"}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1330) ->(gdb)\n"},"seq":94}
1: (1330) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1331) ->=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00000001000007b4\",func=\"main\",file=\"helloworld.cpp\",fullname=\"/Users/evansmith/Documents/CS_142_TA/test/helloworld.cpp\",line=\"10\",pending=[\"main\"],times=\"0\",original-location=\"main\"}\n"},"seq":96}
1: (1331) ->=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00000001000007b4",func="main",file="helloworld.cpp",fullname="/Users/evansmith/Documents/CS_142_TA/test/helloworld.cpp",line="10",pending=["main"],times="0",original-location="main"}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1332) ->(gdb)\n"},"seq":98}
1: (1332) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1335) 1007: elapsed time 8\n"},"seq":100}
1: (1335) 1007: elapsed time 8
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1346) Send Event AD7EngineCreateEvent\n"},"seq":102}
1: (1346) Send Event AD7EngineCreateEvent
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1350) Send Event AD7ProgramCreateEvent\n"},"seq":104}
1: (1350) Send Event AD7ProgramCreateEvent
--> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/Launch","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"14.0.60919.1","VS.Diagnostics.Debugger.HostVersion":"14.0.60919.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.Launch.Duration":1179,"VS.Diagnostics.Debugger.Launch.IsCoreDump":false,"VS.Diagnostics.Debugger.VisualizerFileUsed":false,"VS.Diagnostics.Debugger.SourceFileMappings":0,"VS.Diagnostics.Debugger.MIMode":null}},"seq":106}
--> R (launch-2): {"type":"response","request_seq":2,"success":true,"command":"launch","body":{},"seq":108}
--> E (initialized): {"type":"event","event":"initialized","body":{},"seq":110}
<-- C (setBreakpoints-3): {"command":"setBreakpoints","arguments":{"source":{"name":"helloworld.cpp","path":"/Users/evansmith/Documents/CS_142_TA/test/helloworld.cpp"},"lines":[10],"breakpoints":[{"line":10}],"sourceModified":false},"type":"request","seq":3}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1411) <-1008-break-insert -f on helloworld.cpp:10\n"},"seq":113}
1: (1411) <-1008-break-insert -f on helloworld.cpp:10
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1412) ->1008^done,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00000001000007b4\",func=\"main\",file=\"helloworld.cpp\",fullname=\"/Users/evansmith/Documents/CS_142_TA/test/helloworld.cpp\",line=\"10\",pending=[\"helloworld.cpp:10\"],times=\"0\",original-location=\"helloworld.cpp:10\"}\n"},"seq":115}
1: (1412) ->1008^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x00000001000007b4",func="main",file="helloworld.cpp",fullname="/Users/evansmith/Documents/CS_142_TA/test/helloworld.cpp",line="10",pending=["helloworld.cpp:10"],times="0",original-location="helloworld.cpp:10"}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1413) ->(gdb)\n"},"seq":117}
1: (1413) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1413) ->=breakpoint-modified,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00000001000007b4\",func=\"main\",file=\"helloworld.cpp\",fullname=\"/Users/evansmith/Documents/CS_142_TA/test/helloworld.cpp\",line=\"10\",pending=[\"helloworld.cpp:10\"],times=\"0\",original-location=\"helloworld.cpp:10\"}\n"},"seq":119}
1: (1413) ->=breakpoint-modified,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x00000001000007b4",func="main",file="helloworld.cpp",fullname="/Users/evansmith/Documents/CS_142_TA/test/helloworld.cpp",line="10",pending=["helloworld.cpp:10"],times="0",original-location="helloworld.cpp:10"}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1413) ->(gdb)\n"},"seq":121}
1: (1413) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1413) 1008: elapsed time 1\n"},"seq":123}
1: (1413) 1008: elapsed time 1
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1427) Send Event AD7BreakpointBoundEvent\n"},"seq":125}
1: (1427) Send Event AD7BreakpointBoundEvent
--> R (setBreakpoints-3): {"type":"response","request_seq":3,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"verified":true,"line":10}]},"seq":127}
--> E (breakpoint): {"type":"event","event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":1,"verified":true,"line":10}},"seq":129}
<-- C (setFunctionBreakpoints-4): {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":4}
--> R (setFunctionBreakpoints-4): {"type":"response","request_seq":4,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]},"seq":132}
<-- C (setExceptionBreakpoints-5): {"command":"setExceptionBreakpoints","arguments":{"filters":[]},"type":"request","seq":5}
--> R (setExceptionBreakpoints-5): {"type":"response","request_seq":5,"success":true,"command":"setExceptionBreakpoints","body":{},"seq":135}
<-- C (configurationDone-6): {"command":"configurationDone","type":"request","seq":6}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1485) Send Event AD7LoadCompleteEvent\n"},"seq":139}
1: (1485) Send Event AD7LoadCompleteEvent
--> R (configurationDone-6): {"type":"response","request_seq":6,"success":true,"command":"configurationDone","body":{},"seq":138}
<-- C (threads-7): {"command":"threads","type":"request","seq":7}
--> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"Warning: Debuggee TargetArchitecture not detected, assuming x86_64.\n"},"seq":142}
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1493) <-1009-exec-run\n"},"seq":145}
1: (1493) <-1009-exec-run
--> R (threads-7): {"type":"response","request_seq":7,"success":true,"command":"threads","body":{"threads":[]},"seq":147}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3491) ->1009^running\n"},"seq":149}
1: (3491) ->1009^running
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3491) ->=thread-group-started,id=\"i1\",pid=\"13225\"\n"},"seq":151}
1: (3491) ->=thread-group-started,id="i1",pid="13225"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3491) 1009: elapsed time 1997\n"},"seq":153}
1: (3491) 1009: elapsed time 1997
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3492) ->(gdb)\n"},"seq":155}
1: (3492) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3492) ->=thread-created,id=\"1\",group-id=\"i1\"\n"},"seq":157}
1: (3492) ->=thread-created,id="1",group-id="i1"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3493) ->=thread-selected,id=\"1\"\n"},"seq":159}
1: (3493) ->=thread-selected,id="1"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3494) ->(gdb)\n"},"seq":161}
1: (3494) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3494) ->*running,thread-id=\"all\"\n"},"seq":163}
1: (3494) ->*running,thread-id="all"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3495) ->(gdb)\n"},"seq":165}
1: (3495) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3498) ->(gdb)\n"},"seq":167}
1: (3498) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3498) ->=thread-exited,id=\"1\",group-id=\"i1\"\n"},"seq":169}
1: (3498) ->=thread-exited,id="1",group-id="i1"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3498) ->=thread-group-exited,id=\"i1\",exit-code=\"0\"\n"},"seq":171}
1: (3498) ->=thread-group-exited,id="i1",exit-code="0"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3499) ->*stopped,reason=\"exited-normally\"\n"},"seq":173}
1: (3499) ->*stopped,reason="exited-normally"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3499) ->(gdb)\n"},"seq":175}
1: (3499) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3500) <-1010-thread-info 1\n"},"seq":177}
1: (3500) <-1010-thread-info 1
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3501) ->1010^done,threads=[{id=\"1\",target-id=\"Thread 1\",frame={level=\"0\",addr=\"0xffffffffffffffff\",func=\"??\",args=[],file=\"??\",fullname=\"??\",line=\"0\"},state=\"running\"}]\n"},"seq":179}
1: (3501) ->1010^done,threads=[{id="1",target-id="Thread 1",frame={level="0",addr="0xffffffffffffffff",func="??",args=[],file="??",fullname="??",line="0"},state="running"}]
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3502) ->(gdb)\n"},"seq":181}
1: (3502) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"=thread-selected,id=\"1\"\n"},"seq":183}
=thread-selected,id="1"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3510) 1010: elapsed time 9\n"},"seq":185}
1: (3510) 1010: elapsed time 9
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3513) Send Event AD7ProcessInfoUpdatedEvent\n"},"seq":187}
1: (3513) Send Event AD7ProcessInfoUpdatedEvent
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3514) Send Event AD7ThreadCreateEvent\n"},"seq":189}
1: (3514) Send Event AD7ThreadCreateEvent
--> E (thread): {"type":"event","event":"thread","body":{"reason":"started","threadId":1},"seq":191}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3524) <--gdb-exit\n"},"seq":193}
1: (3524) <--gdb-exit
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3524) ->^exit\n"},"seq":195}
1: (3524) ->^exit
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3525) ->=thread-group-exited,id=\"i1\"\n"},"seq":197}
1: (3525) ->=thread-group-exited,id="i1"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3525) ->(gdb)\n"},"seq":199}
1: (3525) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3534) ->\n"},"seq":201}
1: (3534) ->
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3534) ->\n"},"seq":203}
1: (3534) ->
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3537) <-logout\n"},"seq":205}
1: (3537) <-logout
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3547) Send Event AD7ProgramDestroyEvent\n"},"seq":207}
1: (3547) Send Event AD7ProgramDestroyEvent
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"The program '/Users/evansmith/Documents/CS_142_TA/test/helloworld.out' has exited with code 0 (0x00000000).\r\n\n"},"seq":209}
The program '/Users/evansmith/Documents/CS_142_TA/test/helloworld.out' has exited with code 0 (0x00000000).
--> E (exited): {"type":"event","event":"exited","body":{"exitCode":0},"seq":211}
--> E (terminated): {"type":"event","event":"terminated","body":{},"seq":213}
--> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/DebugCompleted","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"14.0.60919.1","VS.Diagnostics.Debugger.HostVersion":"14.0.60919.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.DebugCompleted.BreakCounter":0}},"seq":215}
<-- C (disconnect-8): {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":8}
--> R (disconnect-8): {"type":"response","request_seq":8,"success":true,"command":"disconnect","body":{},"seq":218}
same here. vscode 1.40, catalina. Doesn't stop
@neilyoung The pinned issue #3829 is what you are running into. Please refer to that one.
@pieandcakes Yes, thanks. Found that by myself already. I can confirm, that CodeLLDB works
Most helpful comment
From the engine logs, I do not see any breakpoints being set. Do you have a sample C++ project I could recreate your issue with?