Run without debugging on VSCode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-23 11:29 PM
I have setup STM32 VSCode extension on my PC and it is amazing. The only problem that I have encountered is that it is not possible to run the code without debugging. I removed the "runToEntryPoint": "main" line in launch.json. But every time I launch the code it attaches a debugger. How can I simply run the code without debugging?
Thank you,
Damiano
Solved! Go to Solution.
- Labels:
-
VSCode for STM32
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-06 10:12 AM
In the tasks.json file, there is a a "task" labeled STM32: CubeProg: Flash project (SWD)
You can execute this task to perform a "flash and reset" altogether!
There are 3 options to execute this:
Option1: By "clicking": Terminal > Run Task... > CubeProg: Flash Project (SWD)
Option2 via Run Task keyboard shortcut:
Option3: Pre-installed keyboard shortcut:
- CTRL + P
- Type: "Task CubePro..." <-- You will notice that the menu auto-suggests tasks matching your pattern.
Option3: Pre-installed keyboard shortcut:
- CTRL+ALT+F <-- This will immediately execute the same task
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-24 2:13 AM - edited ‎2025-04-24 2:13 AM
Hello @DamianoF,
Did you try this and didn't not work for you?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-24 4:53 AM - edited ‎2025-04-24 4:54 AM
Hello @Sarra.S and thank you for your answer
I tried it and it kind of works, but not in the way I expected. When I click "Run Without Debugging" as you suggested, the debug buttons (those in the image below) still appear and the code does not execute until I click on the red square (which is the stop button, a little counterintuitive). What I expect is that when I click on "Run without debugging" the code will be flashed directly on the MCU, the debug buttons don't show up and the code does not wait for me to click any button at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-24 6:27 AM - edited ‎2025-04-24 6:52 AM
STM32CubeIDE had this issue for the first few releases. It's odd that the developers didn't realize "run without debugging" was a critical feature. Maybe it's the same devs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-24 6:30 AM
@TDKI am not using STM32CubeIDE, but VSCode with STM32 VSCode extension
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-06 3:15 AM
Hello @DamianoF,
For the moment, in order to execute this from the VS Code top menu,
- Stop the current MCU from running using Shift + F5 (if it is running)
- After compiling and flashing with "Run Without Debugging, manually reset the device on the hardware in order to start executing.
Please check Mattias's answer in this thread: New STM32 VSCode extension V2.0.0 released - STMicroelectronics Community
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-06 4:40 AM
Thank you @Sarra.S!
So at the moment the only solution is to do what I already do. If possible I ask to you if you can report this limitation to the ST team that develops the extension. It is not a big limitation but it is very helpful in day-to-day use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-06 10:12 AM
In the tasks.json file, there is a a "task" labeled STM32: CubeProg: Flash project (SWD)
You can execute this task to perform a "flash and reset" altogether!
There are 3 options to execute this:
Option1: By "clicking": Terminal > Run Task... > CubeProg: Flash Project (SWD)
Option2 via Run Task keyboard shortcut:
Option3: Pre-installed keyboard shortcut:
- CTRL + P
- Type: "Task CubePro..." <-- You will notice that the menu auto-suggests tasks matching your pattern.
Option3: Pre-installed keyboard shortcut:
- CTRL+ALT+F <-- This will immediately execute the same task
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
