"Unable to start debugging. No process is associated with this object." - 在Visual Studio Code中使用GDB
"Unable to start debugging. No process is associated with this object." - STM32F4 with GDB and openOCD in Visual Studio Code
Windows 10VSCode 1.28.1
VSC CPP Tools Extension 0.19.0 开发板: Multitech MTUDK2-ST
OpenOCD 0.10.0
GDB (7.12.1.20170417.git 作为 GNU ARM 工具链 6-2017-Q2-更新的一部分(
尝试根据此设置/示例进行调试。使用 Mbed CLI (1.8.2( 编译二进制文件在命令提示符下工作正常。 还可以在一个命令提示符实例中成功启动 openOCD,并通过 VS Code 终端会话上的 GDB 会话与之通信(使用 arm-none-eabi-gdb 启动(。
启动调试会话会在 VSC 调试控制台上生成以下输出:
1: (628) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'
1: (667) LaunchOptions ExePath='Z:VoboNode_vsc_nucleo_f411REVoBoNodeBUILDMTS_MDOT_F411REGCC_ARM-DEBUGVoBoNode.elf'
1: (667) LaunchOptions WorkingDirectory='Z:VoboNode_vsc_nucleo_f411REVoBoNode'
1: (667) LaunchOptions ExeArguments=''
1: (667) LaunchOptions MIMode='gdb'
1: (667) LaunchOptions MIDebuggerPath='C:Program Files (x86)GNU Tools ARM Embedded6 2017-q2-updatebinarm-none-eabi-gdb.exe'
1: (667) LaunchOptions WaitDynamicLibLoad='false'
1: (667) LaunchOptions DebugServer='C:OpenOCDopenocd-0.10.0binopenocd.exe'
1: (667) LaunchOptions DebugServerArgs='-f C:OpenOCDopenocd-0.10.0scriptsboardst_nucleo_f4.cfg -f C:OpenOCDopenocd-0.10.0scriptsinterfacestlink-v2-1.cfg -c init -c "reset init"'
1: (667) LaunchOptions ServerStarted='target halted due to debug-request, current mode: Thread'
1: (667) LaunchOptions FilterStderr='true'
1: (667) LaunchOptions ServerLaunchTimeout='20000'
1: (667) LaunchOptions>
1: (667) LaunchOptions <SetupCommands>
1: (668) LaunchOptions <Command IgnoreFailures='false' Description=''>-environment-cd Z:VoboNode_vsc_nucleo_f411REVoBoNodeBUILDMTS_MDOT_F411REGCC_ARM</Command>
1: (668) LaunchOptions <Command IgnoreFailures='false' Description='connect to target'>-target-select remote localhost:3333</Command>
1: (668) LaunchOptions <Command IgnoreFailures='false' Description='load file'>-file-exec-and-symbols VoBoNode.elf</Command>
1: (668) LaunchOptions <Command IgnoreFailures='false' Description=''>-interpreter-exec console "monitor endian little"</Command>
1: (668) LaunchOptions <Command IgnoreFailures='false' Description=''>-interpreter-exec console "monitor reset"</Command>
1: (668) LaunchOptions <Command IgnoreFailures='false' Description=''>-interpreter-exec console "monitor halt"</Command>
1: (668) LaunchOptions <Command IgnoreFailures='false' Description=''>-interpreter-exec console "monitor arm semihosting enable"</Command>
1: (668) LaunchOptions <Command IgnoreFailures='false' Description='flash target'>-target-download</Command>
1: (668) LaunchOptions </SetupCommands>
1: (668) LaunchOptions</LocalLaunchOptions>
1: (806) Starting: "C:OpenOCDopenocd-0.10.0binopenocd.exe" -f C:OpenOCDopenocd-0.10.0scriptsboardst_nucleo_f4.cfg -f C:OpenOCDopenocd-0.10.0scriptsinterfacestlink-v2-1.cfg -c init -c "reset init"
1: (1007) "C:OpenOCDopenocd-0.10.0binopenocd.exe" exited with code 1 (0x1).
1: (1023) <-logout
请注意,使用"开始:"(第 806 行(后面显示的确切命令行手动启动 openOCD 可以正常工作。 我怀疑设置命令(多行 668(存在问题,导致 OpenOCD 会话无法启动。 无论如何,我不确定应该如何从手动启动的 GDB 会话提示符执行 OP 的 GDB 命令,因此我很难进行故障排除。
让它工作了。以前生成的内容存在于 VS Code 生成查找以加载以进行调试的位置,这似乎是一个问题。删除整个文件夹并允许 VS Code 通过新版本重新填充它解决了 openOCD 错误。现在,即使我不删除以前构建的内容,该构建也可以正常工作。不完全确定为什么这有效,但它确实如此。
相关文章:
- Visual Studio 2015:Extern "C" 和 "export" 关键字
- 为cl.exe(Visual Studio代码)指定命令行C++版本
- 试图在visual studio上用C++创建一个桌面应用程序
- 如何在MS Visual Studio 2019中运行QT UI
- 如何使用Visual Studio 2017在C++中为参数化对象数组使用唯一指针
- Visual Studio Code - C++ Debugger 無法啟動
- Visual Studio 2019:插入多个C++风格的单行注释
- Visual Studio Code "undefined reference to `WinMain@16'"
- Visual studio代码重构似乎不起作用(例如,重命名符号-f2)
- Visual Studio中的函数声明和函数定义问题
- 如何指定我希望我的LIB链接到的DLL文件?-Visual Studio 2019
- Visual Studio mkl_link_tool.exe链接错误
- Visual Studio(或任何其他工具)能否将地址解释为调用堆栈(boost上下文)的开头
- 不同的Visual Studio版本中缺少.dll
- 用Visual Studio在C++中嵌入Julia
- Visual Studio 2017循环自动向量化问题
- 有没有办法在远程设备上打开和编辑visual Studio 2017解决方案
- 尝试使用继承和模板实现CRTP.Visual Studio正在生成编译器错误
- Visual Studio在尝试读取resource.txt文件时崩溃
- Visual Studio 2017 不允许我创建 C++ 专用模板