I am trying to issue some gdb commands in vscode's Debug Console, but fail

why and how to fix?
From the Visual Studio Code official page:
For the C++ (GDB/LLDB) debugging environment, you can execute GDB, LLDB and LLDB-MI commands directly through the debug console with the -exec command, but be careful, executing commands directly in the debug console is untested and might crash VS Code in some cases.
E.g. for debugging child process after fork:
-exec set follow-fork-mode child
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With