You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My team is putting one file per mission model and one issue is that they often hit play from their mission model file instead of the main file that loads all of them. Any possibility of adding a "default" Play program file?
I've been wondering about this too some times. Use cases:
Working on a multi-mission program with one main entry point in another file (OPs case)
Working on a library file and having a main program to test it
This is also conventional in full editors, where you might do this with a launch config.
Alternatives considered
Work with __name__ == "__main__" to make this work, but this can get a bit messy with many files.
Implementation idea 1
Mark file as main on file tab with an extra icon there.
Implementation idea 2
Enter main file in somewhere under settings.
Implementation idea 3 (my favorite)
Making this completely persistent in local storage as above could be confusing when you open the editor later to work on something else.
So here's a variant that lets you mark the main file by right clicking on a tab and choosing "mark as starting point".
In fact, since we don't currently have any context dialog for tabs, maybe just double clicking to toggle this will work.
If having an "entry icon" is tricky in this layout framework, we could prefix the displayed name with (main).
Hey @laurensvalk - thanks for getting back to me so quickly. For how we use pybricks, the kids don't really switch into and out of projects so having it as a setting that is persisted in localStorage makes sense to me.
If it's just in the tab (or right clicking a tab) I would be concerned about discoverability. This does seem like something that would be in settings if I'm looking for it. (Usually when I'm looking at a code project I'm looking for a run script somewhere in the home directory as a setting).
Originally posted by @davidyang in #1901
The text was updated successfully, but these errors were encountered: