VSC debug start problem.

simark1979
Posts: 5
Joined: Wed Sep 09, 2020 5:18 pm

VSC debug start problem.

Postby simark1979 » Fri Sep 11, 2020 6:04 am

I got the problem while starting debug in VSCode via ESP-IDF Debug Adapter
So when I lanch debug, debug not starting.
Step buttons disabled (see attachment)
OpenOCD and ESP-IDF Debug Adapter logs in attachment.

My lunch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "espidf",
"name": "Launch",
"request": "launch",
"debugPort": 3333,
"logLevel": 2,
"mode": "auto",
}
]
}


Thank you!
Attachments
VSCode Debug mode.PNG
VSCode Debug mode.PNG (89.07 KiB) Viewed 2743 times
OpenOCD.log
(16.9 KiB) Downloaded 401 times
ESP-IDF Debug Adapter.log
(248 Bytes) Downloaded 407 times

simark1979
Posts: 5
Joined: Wed Sep 09, 2020 5:18 pm

Re: VSC debug start problem.

Postby simark1979 » Sun Sep 13, 2020 9:10 pm

I got solution.

Espressivf`s debug adapter for strange reason doesn`t starts on my machine.
Debuger via "Microsoft C/C++" extetion works, but buggy: works slow, starts randomly, need manual breakpoint add in the begin of app_main() function (tried to use "thb app_main" cmd, but it doesn`t work)

Thanks to Adam-U for the article at
https://github.com/Adam-U/ESP32_VSCode_Debug
At this moment only "Native Debug " works perfectly: fast, always starts.

Just add to launch.json:
And don`t forget start OpenOCD before launch.
  1. {
  2.   "version": "0.2.0",
  3.   "configurations": [
  4.     {
  5.       "type": "gdb",
  6.       "request": "launch",
  7.       "name": "Launch Program",
  8.       "target": "${workspaceFolder}\\build\\${command:espIdf.getProjectName}.elf",
  9.       "cwd": "${workspaceFolder}",
  10.       "gdbpath": "path\\to\\xtensa-esp32-elf-gdb.exe",
  11.       "autorun": [
  12.         "target remote localhost:3333",
  13.         "mon reset halt",
  14.         "flushregs",
  15.         "thb app_main",
  16.         "c"
  17.       ],
  18.     }
  19.   ]
  20. }

By the way,
The default VSCode theme makes debugging line not visible.
To change color, use this property in settings


"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#44475a"
}
Last edited by simark1979 on Mon Sep 14, 2020 4:33 am, edited 1 time in total.

Who is online

Users browsing this forum: No registered users and 72 guests