Код: Выделить всё
{
// See https://code.visualstudio.com/docs/cpp/launch-json-reference
"name": "Debug WeatherStation",
"cwd": "${workspaceRoot}",
"request": "launch",
"program": "${workspaceRoot}/build/src/WeatherStation",
"args": [
"-l",
"journal"
],
// Use cppdbg when using gdb
"type": "cppdbg",
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb-multiarch",
"miDebuggerArgs": "",
"miDebuggerServerAddress": "192.168.50.200:4711",
"targetArchitecture": "arm64",
"stopAtEntry": false,
"preLaunchTask": "StartGDBServer",
"postDebugTask": "StopGDBServer"
},
Код: Выделить всё
int main(int argc, char** argv) {
while(opt = getopt(argc, argv, "l:") != -1) {
string value;
switch (opt) {
Я нашел что-то, что предлагало использовать argv*[] в main:
Код: Выделить всё
int main(int argc,char* argv[]) {
Есть идеи, что я делаю неправильно?
Спасибо< /п>
Подробнее здесь: https://stackoverflow.com/questions/793 ... -debugging
Мобильная версия