ESP32S3在VScode中使用USB口调试

ESP32S3在VScode中使用USB口调试

安装USB驱动

在powershell中输入下面指令:

c 复制代码
Invoke-WebRequest 'https://dl.espressif.com/dl/idf-env/idf-env.exe' -OutFile .\idf-env.exe; .\idf-env.exe driver install --espressif

参考官方网址

安装成功之后连接开发板的USB口(非串口)如下图所示:

修改工程的配置文件

参考文档:
JTAG调试
使用VS code调试

launch.json

修改为如下内容:

json 复制代码
{
  "version": "0.2.0",
  "configurations": [
  {
      "name": "GDB",
      "type": "cppdbg",
      "request": "launch",
      "MIMode": "gdb",
      "miDebuggerPath": "${command:espIdf.getXtensaGdb}",
      "program": "${workspaceFolder}/build/${command:espIdf.getProjectName}.elf",
      "windows": {
      "program": "${workspaceFolder}\\build\\${command:espIdf.getProjectName}.elf"
      },
      "cwd": "${workspaceFolder}",
      "environment": [{ "name": "PATH", "value": "${config:idf.customExtraPaths}" }],
      "setupCommands": [
      { "text": "set remotetimeout 100" },
      { "text": "target extended-remote :3333" },
      { "text": "set remote hardware-watchpoint-limit 2"},
      { "text": "mon reset halt" },
      { "text": "thb app_main" },
      { "text": "flushregs" }
      ],
      "externalConsole": false,
      "logging": {
      "engineLogging": true
      }
  }
  ]
}

settings.json

修改如下:

json 复制代码
	//"idf.openOcdConfigs": [
    //    "interface/ftdi/esp32_devkitj_v1.cfg",
    //    "target/esp32.cfg"
    //],
    "idf.openOcdConfigs": [
        "board/esp32s3-builtin.cfg"
    ],

启动GDB Server




相关推荐
tan180°3 小时前
MySQL表的操作(3)
linux·数据库·c++·vscode·后端·mysql
万千思绪6 小时前
【PyCharm 2025.1.2配置debug】
ide·python·pycharm
我在看世界8 小时前
家里vscode连公司内网vscede
vscode·ssh
不想迷路的小男孩11 小时前
Android Studio 中Palette跟Component Tree面板消失怎么恢复正常
android·ide·android studio
AlickLbc11 小时前
在phpstudy环境下配置搭建XDEBUG配合PHPSTORM的调试环境
ide·phpstorm
悠悠小茉莉11 小时前
Win11 安装 Visual Studio(保姆教程 - 更新至2025.07)
c++·ide·vscode·python·visualstudio·visual studio
SZ17011023112 小时前
华为云 银河麒麟 vscode远程连接
ide·vscode·华为云
yanjiee13 小时前
需要scl来指定编译器的clangd+cmake在vscode/cursor开发环境下的配置
ide·vscode·编辑器
Waltt_Qiope16 小时前
关于使用cursor tunnel链接vscode(避免1006 issue的做法)
ide·vscode·issue
Charlene Fung17 小时前
vs code远程自动登录服务器,无需手动输入密码的终极方案(windows版)
运维·服务器·vscode·ssh