cancel
Showing results for 
Search instead for 
Did you mean: 

random file open when run the code

Thsl
Associate II

Hello

im trying to run the code , but in the CUbeIDE there are multiple files are opening and pointing to some coding , its hazzle , tried to find a direct answer , ow to avoid this jumping file when run the code.

8 REPLIES 8
TDK
Super User

It's annoying and there's no way to fix this.

 

If you feel a post has answered your question, please click "Accept as Solution".
Thsl
Associate II

oh 

Thank you for the information. I see—I'm currently using version 1.18. Does the new version exhibit the same behavior? It’s quite inconvenient during run and debugging, as the cursor jumps to different files and unrelated code locations. We then have to manually navigate back to the main file, which disrupts the workflow. Has ST acknowledged this issue, or are there any plans to address it in upcoming releases?

 

Andrew Neil
Super User

This is a long-standing and well-known issue:

Annoying open random file when I run my project

random file open when run the code

Jumping to random file after pressing Run button

etc, etc, etc, ...

 

It's not really random - it's the IDE going through the startup process before it reaches main().

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Does the same thing happen in VSCode ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

It is talked about occasionally. I doubt it will ever be fixed.

@mattias norlander Any plans to fix this?

If you feel a post has answered your question, please click "Accept as Solution".

@Thsl wrote:

We then have to manually navigate back to the main file,


Do you?

When it's set to 'Run to main', it will always end up focussed on the first line of main().

Does for me, anyhow...

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

hi

i didnt find this issue in VS code. STM32Cube IDE 1.19 has the same issue ? cos im using 1.18

hi 

in my case curser goes to STM321xx_hal.c file and stop some line of code, then to modify my main i have to manually select the main.c file do any changes , in my code there is no errors or warnings.