cancel
Showing results for 
Search instead for 
Did you mean: 

Run program opens a random file after a debuggin session (STM32CubeIDE 1.17.0)

Lukasz Nowak
Associate III

This is a really annoying problem which has existed for multiple releases of STM32CubeIDE. It is still present in 1.17.0.

Procedure:

- compile a new project

- start a debugging session - step a few times, and exit

- make some code changes

- hit the Run button - upload a new build, without a debugger

 

With that procedure, the IDE every times opens a random file during the upload procedure, e.g.:

LukaszNowak_0-1732715133172.png

This often leaves dozens of open files, completely ruining IDE navigation.

The problem can only be cleared by exiting the entire IDE and opening it again. It will then work fine, until the next debugging session is started.

This has been tested with a clean installation. On Windows and on Linux. 100% reproducible.

4 REPLIES 4
STea
ST Employee

Hello @Lukasz Nowak ,

Thank you for your input. I'm able to reproduce the behavior that you are describing, and the issue is trucked internally 

(ticket 197194 for internal reference only).
Regards

 

In order 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.

@Lukasz Nowak wrote:

This often leaves dozens of open files, completely ruining IDE navigation.


I think the extra tabs always open to the right of whatever you already had open?

So, as a workaround, right-click on the right-most of your "own" tabs, and choose 'Close tabs to the right'

AndrewNeil_0-1732721681171.png

PHolt.1
Senior III

A general solution to this problem had been posted in one of the threads about a year ago.

It involves inserting code which, before it opens the said file, checks some condition leading up to it. I don't recall the details though. It was not trivial but doable by somebody competent in java and Eclipse.

Basically Cube IDE treats several things as breakpoints, some incorrectly.


@Andrew Neil wrote:
I think the extra tabs always open to the right of whatever you already had open?

The problem is that if you don't have main.c opened and have a breakpoint set there you have (from left to right): files you had opened, new garbage file, main.c. So the garbage file is now in the middle. Repeat debugging a few times and it is total chaos and all tabs are occupied.

I followed a tip to prevent the flashing from crashing by accidentally clicking on the play button during flashing: https://community.st.com/t5/stm32cubeide-mcus/jumping-to-random-file-after-pressing-run-button/m-p/740123/highlight/true#M32142
It should be easy for ST to prevent opening new files while this dialog box is visible. That should fix it imho.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.