Debugger executable '/path/to/arm-none-eabi-gdb' is not signed. As a result, debugging may not work

Problem

In some cases, even if you set up .vscode/launch.json by following the instruction page, fail to run debug with the message:

Quote:

Debugger executable '/path/to/arm-none-eabi-gdb' is not signed. As a result, debugging may not work properly.

Many possible solutions are found for this error message on Google, but they didn't work for my case.

The root cause in my case was another process used the port 3333. pyOCD also uses the port 3333 by default and fails.

Check if this workaround works for you

When you cannot run debug from Visual Studio Code and see the message above, run this command from your terminal window.

$ lsof -i :3333

This command checks if any process is using port 3333. If nothing appeared, this workaround doesn't work. If you can see something like this, this workaround would work for you.

COMMAND   PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Command 51445 user0001    4u  IPv4 0xXXXXXXXXXXXX      0t0  TCP localhost:dec-notes (LISTEN)

Workaround

You can simply kill the process which uses port 3333. However, side effect might be caused.

Switch the port of debug server

In .vscode/launch.json, modify two parameters in addition to the instruction page. Here, use port 3334 for example.

  • Modify debugServerArgs
"debugServerArgs": "--port=3334"
  • Modify -target-select value in setupCommands
 { "text": "-target-select remote localhost:3334", "description": "connect to target", "ignoreFailures": false },

Try launch the debugger. It should work.

Got the same error message again! :-(

Once you set up a different port, debugger will be launched. However, you might get the same error message when you run debug second time or later. If this happen, please check if the previous debug process remains alive.

$ ps axu | grep gdb
user         90955   1.4  0.2  4336744  36896   ??  S     4:43PM   0:49.74 /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Library/Frameworks/Python.framework/Versions/2.7/bin/pyocd-gdbserver --port=3334
user         90956   0.0  0.8  4423760 137488   ??  S     4:43PM   0:03.27 /Users/user/gcc-arm-none-eabi/bin/arm-none-eabi-gdb --interpreter=mi
user         97272   0.0  0.0  4276968    876 s002  R+    5:19PM   0:00.01 grep gdb

If you can see pyocd-gdbserver is running, kill it.

$ kill -HUP 95955

(*) Please replace the number 95955 (PID) to the appropriate number on your environment.

Then try launch debugger again.


Please log in to post comments.