Open vescovd1 opened 7 months ago
I am triggering from the "Debug" icon from the CMSIS view
Hi @vescovd1,
Issue exists because your launch config uses Arm Embedded Debugger extension for debugging and Arm Debugger extension for flashing the application on the device. I recommend adding the new Debug configuration that uses Arm Debugger. You can find more on how to set it up here: Arm Debugger configuration
so I tried changing my launch json to arm-debugger from arm-debug but it still does not work.
launch.json: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [
{
"name": "Arm Debugger",
"type": "arm-debugger",
"request": "launch",
"serialNumber": "${command:device-manager.getSerialNumber}",
"program": "${command:arm-debugger.getApplicationFile}",
"cmsisPack": "${command:cmsis-csolution.getTargetPack}",
"deviceName": "${command:cmsis-csolution.getDeviceName}",
"processorName": "${command:cmsis-csolution.getProcessorName}",
"preLaunchTask": "arm-debugger.flash: Flash Device"
}
]
}
tasks.json: { "version": "2.0.0", "tasks": [ { "label": "arm-debugger.flash: Flash Device", "type": "arm-debugger.flash", "serialNumber": "${command:device-manager.getSerialNumber}", "program": "${command:arm-debugger.getApplicationFile}", "cmsisPack": "${command:cmsis-csolution.getTargetPack}", "deviceName": "${command:cmsis-csolution.getDeviceName}", "processorName": "${command:cmsis-csolution.getProcessorName}", "problemMatcher": [] } ] }
all I really want to do is press my debug icon in the cmsis context window and have it launch the flash, and flash should have a depends on "build" task. Please tell how to do this as the whole ARM: debug, ARM: debugger and ARM: embedded debugger is very confusing and poorly documented.
with this configuration for task.json: { "version": "2.0.0", "tasks": [ { "label": "Build Context", "type": "cmsis-csolution.build", "solution": "${command:cmsis-csolution.getSolutionPath}", "rebuild": false, "problemMatcher": [], "group": { "kind": "build", "isDefault": true } }, { "label": "arm-debugger.flash: Flash Device", "type": "arm-debugger.flash", "serialNumber": "${command:device-manager.getSerialNumber}", "program": "${command:arm-debugger.getApplicationFile}", "cmsisPack": "${command:cmsis-csolution.getTargetPack}", "deviceName": "${command:cmsis-csolution.getDeviceName}", "processorName": "${command:cmsis-csolution.getProcessorName}", "problemMatcher": [], "dependsOn": "Build Context" } ] }
I can MANUALLY trigger flash task and it works as expected. If build is out of date the build is pretriggered as expected.
I can also launch debugger after MANUALLY triggering flash load if I remove the "preLaunchTask" line from the launch json. Debugger attaches and works just fine. Its only when I add the "preLaunchTask" and point it to flash task does it not work.
You may be hitting this issue: https://github.com/microsoft/vscode/issues/157041
Can you try running the debug through the debug UI instead of the control in the outline view?
Don't think so as "dependsOn" works just fine. It's the "preLaunchTask" that is the problem.
so its only when you launch the debugger via the CMSIS view. Doing the Run->Debug from top menu works and also by pressing F5 works. See screen shot.
so its only when you launch the debugger via the CMSIS view. Doing the Run->Debug from top menu works and also by pressing F5 works. See screen shot.
Yes, so it this bug: https://github.com/microsoft/vscode/issues/157041
I'll update it to mention it occurs with debug too.
Type: Bug Report
Describe the bug
To Reproduce Steps to reproduce the behavior:
Expected behavior
Code sample and logs
`
Screenshots
Additional context
I can trigger the individual Flash Device task and that works. Just not from launch.json