-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GDB works on command line. Does not work via extension (VSC-1548) #1380
Comments
Why not use our Eclipse CDT debug adapter? launch.json {
"configurations": [
{
"type": "gdbtarget",
"request": "attach",
"name": "Eclipse CDT GDB Adapter"
}
]
} If you want to use the Microsoft C/C++ extension for debug, check this template configuration: {
"configurations": [
{
"name": "GDB",
"type": "cppdbg",
"request": "launch",
"MIMode": "gdb",
"miDebuggerPath": "${command:espIdf.getToolchainGdb}",
"program": "${workspaceFolder}/build/${command:espIdf.getProjectName}.elf",
"windows": {
"program": "${workspaceFolder}\\build\\${command:espIdf.getProjectName}.elf"
},
"cwd": "${workspaceFolder}",
"setupCommands": [
{ "text": "set remotetimeout 20" },
],
"postRemoteConnectCommands": [
{ "text": "mon reset halt" },
{ "text": "maintenance flush register-cache"},
],
"externalConsole": false,
"logging": {
"engineLogging": true
}
}
]
} |
I'm confused. I use vscode, not Eclipse. How does Eclipse factor into this at all? |
esp-idf extension implements its own debug adapter, it is a fork of https://github.com/eclipse-cdt-cloud/cdt-gdb-adapter which is a vscode extension from the Eclipse CDT team. You just need to add a configuration in launch.json to use it: {
"configurations": [
{
"type": "gdbtarget",
"request": "attach",
"name": "Eclipse CDT GDB Adapter"
}
]
} |
I made the change and got this: Here is the output:
For some reason, it thinks I have an esp32c3. I don't. I have an esp32s3. |
I can see in your doctor command output that the project is configured to use esp32c3. See the Use the |
THanks! That helped alot. Now I'm stuck on: AFAIK, nothing is using that port. Can it be changed? |
It could be that openOCD didn't close properly before and there is a process still running. See if you can kill the hanging process. You can also use the |
That was exactly the problem. Thanks for the help. Everything is working now. :) Closing... |
Thanks for using our extension! 🚀 Your feedback matters! Could you take a moment to rate it on the marketplace? A positive rating helps other developers discover our tools and motivates us to keep improving. ⭐ Rate ESP-IDF Extension: https://marketplace.visualstudio.com/items?itemName=espressif.esp-idf-extension&ssr=false#review-details Your support means a lot to our development team! |
OS
MacOS
Operating System version
15.2 (24C101) (Sequoia)
Visual Studio Code version
Version: 1.96.1 (Universal) Commit: 42b266171e51a016313f47d0c48aca9295b9cbb2 Date: 2024-12-17T17:50:05.206Z Electron: 32.2.6 ElectronBuildId: 10629634 Chromium: 128.0.6613.186 Node.js: 20.18.1 V8: 12.8.374.38-electron.0 OS: Darwin arm64 24.2.0
ESP-IDF version
5.3.1
Python version
3.12.27
Doctor command output
122224-report.txt.zip
Extension
esp_idf_vsc_ext.log.zip
Description
I am able to run GDB with no problems from the command line.
Example:
Other Steps to Reproduce
Here is my
launch.json
:and here is settings.json:
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: