-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: add the run program option #222
Comments
There are only |
It's a WIP. It will have much more options soon. |
For unknown reasons, this combined with build/run feature doesn't work for me. I always got Update 1: I solved it by splitting the arguments from the command. Now the build feature works. Update 2: I tested the run feature. I have the executable in the same directory as the source file. In |
Maybe enable the Execute in terminal checkbox? If it's a terminal app you won't see anything unless you request to open it with a terminal. Currently it does not display the std out of the process anywhere (it will be added later). |
If I check the |
The second part is wrong, I'll fix that (I mean, the second powershell shouldn't open). But the first part probably just run your application and you application closes intermediately so powershell will close automatically after the process ends. Everything is weird for you because it's not using the internal terminal because it's not available. If you have the ecode source available and your building, probably what you want is to powershell to keep open after the process ends, please try the following change in ecode source: |
Geany uses an external terminal emulator to launch the program (
This is standard in IDE, including Visual Studio. |
What's the point of this? It will keep open, and I will have to type |
I have no idea how it behaves, I was asking you to test it and to see if it was the same result than in Geany. Let's find out what command arguments is using Geany and just copy them. |
I don't know anything about the internals of Geany. I used to use CodeBlocks and it does the same as Geany. I don't know how CodeBlocks does this, either. But it seems you will need a launcher, like this: https://github.com/royqh1979/RedPanda-CPP/tree/master/tools/consolepauser |
Frankly speaking, I can live without this feature. |
I modified my code so the program will wait for me to enter a key before quitting. The result is still the same! |
I ended up implementing it anyway, so you shouldn't need the hack anymore, also made some other fixes. It now uses the same utility script than Geany, so it will behave exactly the same. |
I have tested the latest code. Now I see nothing when I click the |
Update 3: Now |
F5 is now build and run. I added a new command for that because it's more practical. |
So |
How to correctly run the compiled program? I have the executable in the same directory as the source file. In |
Mh that's because |
Done: 2024-04-25_14-25-51.mp4 |
I have pulled the latest code but I still see nothing. There is no |
Please share you logs. |
I checked |
If you click the button "Run" nothing is logged? (not the shortcut) |
Yes. |
Show me your config file please, it's in the ".ecode" folder. |
When I click the Here you are:
As you can see, there is only information about the LSP client clangd but nothing about build or run. |
I meant the file located at: |
Here you are:
Note: |
Your build command is wrong. If build fails it wont run. |
The command is corrected, but it still doesn't work. |
Your build output tells you that it succeeded? Can you show me the whole Build output? |
Stripped the date and time:
|
Btw, I always have the executable named Update: Maybe this isn't true in ecode because you have mixed build and run together, so there is no separate run anymore. |
In your ecode config path, it's this file: |
No. I don't have this file. I do Update 1: I deleted the Update 2: I do a search for all files with |
The file is auto-generated on the fly when you execute the "Run" command. But it's not being generated something is going wrong. But if the file fails it should be falling back to the old method of opening |
project_build.json
Build:
Run with
Run with Success! But nothing is shown on ecode.log
|
Ha, you have an space on the Run configuration: Edit: Just to clarify, it works with the terminal because it's trimming the exe path, but on the internal run it's not doing it. |
It only works on the build you give me. On my local build, it doesn't work, even if there is no space. I will try to |
I cleaned everything up with |
Awesome! Running nightly builds isn't always safe, that's one of the reasons I'm not totally sure to share nightly builds. But I guess people will understand that fact. |
Please add this feature. Currently I only see |
The App output it's only possible to be available when you're not using "Run in terminal". Just disable run in terminal. 2024-04-25_17-18-48.mp4 |
You misunderstood me. I'm talking about |
Btw, talking about the App output tab. Given this test.cpp program:
If I don't check
|
That's because it's failing to run the process, the reason is simple, the binary path is not in |
As far as I know, Nightly builds are produced by Github Actions and Github Actions doesn't do incremental builds. |
You didn't have any issues with the incremental build. The problem with nightly builds comes from the fact that many changes can be temporal and may change during development, and for example for file formats this produces breaking changes, I did change the file format while I was developing and changed the feature and I did not make it backwards compatible with the previous unstable builds. |
Update: I think |
You can't dismiss the advantage of Nightly builds. They are really convenient when you need to try the latest features. They help you save time since you don't need to build everything yourself. I have to keep the gigantic MSYS2 only to build ecode, and it also takes a very long time on my slow hardware. Btw, I'm too careless to not take the possibility of the file format being changed into account. When you are using the latest code, breakage like this is expected. |
Originally posted by @SpartanJ in #155 (reply in thread)
The text was updated successfully, but these errors were encountered: