Skip to content
hedger edited this page Jul 18, 2022 · 2 revisions

Please read this page We are just one or two people who maintain this extension for FREE and we have other day jobs. We don't have sponsors and we don't want them right now. If you can help yourselves, you can help us focus on more fundamental things (like live expressions, better memory views, RTOS views, etc.). So please read the docs we have on this Wiki as well as contribute to it. We are super grateful to those who can help improve things. Also, please ask your Silicon vendor (ST, NXP, etc.) to participate and help support their devices/customers specific issues.

And, by all means, submit a new issue after reading this page to help yourselves. And subscribe to help others

How to submit an issue, pre-requisites To help things along and get to the bottom of an issue, we need things (wish we had a template, maybe even generated by our extension)
  • Problem Desictiption
  • Operating system type/version. Version numbers for VSCode, Cortex-Debug, gdb, gdb-server (JLink, OpenOCD, STLink, etc.)
  • Copy of your configuration from launch.json. Without this, we will put this issue at the bottom of the pile. This gives us the most insight as to how you are using our extension. If it is long, you can attach it as a collapsible item or an attachment
  • Steps to duplicate the issue

Debug session does not start as expected

So many things that can go wrong here since so many different software programs and hardware probes are involved

Simple things with physical setup Let's get some of the most simple things out of the way -- happens to the smartest people. Make sure the board is powered on and plugged into the right USB port (both on host and the board). Try the reset button if one exists. Try unplugging and re-plugging the board back in.
Unable to start the gdb-server (OpenOCD, JLinkGDBServerCLExe, STLink gdb server, etc.) If you are using OpenOCD, be extra careful. First, use the latest. Just any random (version does not matter) OpenOCD does not work even those packaged with xPack or Linux/Homebrew/Macports packages.

Make sure the path to the gdb-server is correct. The executable should be found either in your PATH (easiest if you can do that) or use one of the Cortex-Debug User or Workspace settings to set the path. For instance, your JLink server path image

Timeout when connecting to the gdb-server, or the gdb-server terminates immediately upon starting Once the server starts, we wait for an indication that the server is ready to accept connections to GDB. Different gdb servers indicate this differently but they all do. If we don't see this, it times out. See the gdb-server Terminal tab in VSCode to see what could be going wrong. Reasons can be many but here are some
  • The gdb-server is unable to make a connection to your HW so it is not ready to serve a gdb client ... and it is unlikely to ever be ready
  • For OpenOCD, you are missing the configuration files or using the wrong ones for your device/board. Perhaps your search path for finding the configuration files is wrong. There may be an error in the configuration files
  • There is another gdb-server session already running and it needs to be terminated before we can start another. A good indication of this is when we chose TCP port numbers that don't start at 50000
  • Of course, the infamous there is no HW to connect to

gdb does not start or run as expected

Linux: gdb seems to error out or not even start This unfortunately has generated a LOT of issues. gdb's installed with various packages (apt, rpm, etc.) do not include all its dependencies, specifically libncurses. Depending on your distribution, please find and install the missing dependencies. If you can run gdb from the command line and interact with it then you are good to go.
Next Place holder for details