cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to install stlink-gdbserver with bundles manager

DamianoF
Associate III

After a recent update I am unable to run my code from vscode on my Windows 11 machine. The compilation succeed, but when I click on Run -> Start Debugging nothing happens. The System Bundle Manager shows that I have installed all the latest versions, but the bundle manager of the projects shows only a few of those bundles (see attached). How can I install the bundles in the project section?

Note that I have already tried the usual things: remove the build, .vscode and .settings folders, rebooting the pc, upgrading the stlink firmware.

I tested the same code on another linux pc and there it works as expected. On the linux PC `stlink-gdbserver` was installed at project level

1 ACCEPTED SOLUTION

Accepted Solutions
DamianoF
Associate III

I fixed the problem. The issue was that the extension did not create the .vscode/launch.json file. The fix was pretty easy: Run/Add configuration/Stm32Cube: STM32 Launch STLink GDB Server. I wonder why I had to manually do this operation, I never had to do it.

Thanks to the people who answered to the post

View solution in original post

6 REPLIES 6
ElliotAlderson
Associate II

Hi @DamianoF 
From what I observed, the stlink-gdbserver gets installed and locked the first time a debug session is launched for the project.
When you say nothing happens, is there anything in the debug console, even with "verbose" set to true?
When the project was imported, did the project setup complete correctly?

BR,
Elliot

Cartu38 OpenDev
Lead III

@DamianoF 
Works on Linux but not Windows ... any antivirus issue ?
On my side works like a charm Windows11.


Project level install happens if able to launch ... if any failure prior no chance to.


Could you have a try relying on a VS Code integrated terminal:

cube stlink-gdbserver --version 

On my side it reports:

stlink-gdbserver/7.13.0+st.3/bin/ST-LINK_gdbserver.exe  version: 7.13.0


 

DamianoF
Associate III

I fixed the problem. The issue was that the extension did not create the .vscode/launch.json file. The fix was pretty easy: Run/Add configuration/Stm32Cube: STM32 Launch STLink GDB Server. I wonder why I had to manually do this operation, I never had to do it.

Thanks to the people who answered to the post

@DamianoF 
I agree should not have to do and myself Idon't have to.
Which VS Code version and OS are you relying on ?
launch.json is pure VS Code stuff according to me

DamianoF
Associate III

VsCode 1.111.0 and OS Windows 11 25H2

Hi @DamianoF@Cartu38 OpenDev 

Note regarding the creation of the launch.json file and the choice of debug configuration to use. This follows rules defined by VSCode.

Launch.json file creation:

If there is no launch.json file, the "Run & Debug" button and the "Run → Start Debugging" menu will use a debug configuration based on the selection explained below. However, in any case, they will not create a launch.json file.
They will use a debug configuration "on the fly".

To create a launch.json, you can click on "create a launch.json file" from the debug activity bar.

Selection of the debug configuration based on:

  • If launch.json exists:

    • The "Run & Debug" button is no longer available.
    • The "Run → Start Debugging" menu (or its associated button) uses the debug configuration selected in the combo box (debug activity bar).
  • If launch.json does not exist:

    • The "Run & Debug" button is available.
    • Using this button or the "Run → Start Debugging" menu:
      • With only one root workspace (i.e., one imported project):
        • Depends on the file open in the editor pane:
          • If the open file belongs to the project, then use the last debug configuration executed:
            • The very first time, of course VSCode prompts the user to choose the adapter.
            • VSCode stores this choice for this workspace in internal metadata.
          • If no file is open in the editor pane, VSCode then prompts the user to choose the adapter.
      • With multiple root workspaces (i.e., at least two imported projects):
        • Does not depend on the file open, but on the last debug configuration used.
        • The very first time, VSCode prompts the user to choose the adapter and uses the first imported project.

Kind Regards,

/Flo

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.