Window console applications will spawn new console - windows

I've been running into some weird problems with some console apps that I use on windows (e.g python pip).
Some apps will run inline with the current console session, however some will spawn/fork a new process, run the command, print out to stdout then the results are copied back to the current session's stdout?
I haven't had this problem before, and is only relatively recent. Is it some weird windows config ?

Related

Why my windows applications detaches from terminal when launched?

I'm developing a windows application and i cannot debug because i don't see any log when i launch the application from a terminal (cmd.exe).
So i started trying other apps like the browser or notepad and i cannot see any log as well.
It seems like the terminal detaches from the application output automatically on start.
It's the first time it happens, i remember some weeks ago i used to start apps from the terminal and they showed on the terminal..
Is there a way to force terminal output for a Windows application?

How can I open a new terminal tab in VSCode's integrated terminal using a shell script?

Question
I've seen lots of ways to open a new terminal "tab/pane/view" using an external Terminal app like the macOS Terminal app or iTerm using a shell script or Apple Script but is it possible to write a script that opens up two different VS Code integrated terminal "tabs/panes/views" in the current workspace?
My Use Case
I'm starting my application and I want the client side logs and server side logs to open in separate integrated terminal windows side-by-side when the build completes.
What I'm Not Looking For
I've seen lots of ways to open a new VSCode terminal tab from within the VSCode settings/UI/key commands/command palette but I specifically need a way to do it using a shell script.
Thanks!

Start the websocket server automatically on Windows without a visible command prompt window

I want to start a websocket server, like using the "php artisan websocket:serve", but that automatically start with windows, and without a windows of command prompt. I know how to do it on linux with supervisor, but i need to do that on Windows 7 with Xampp.
I currently use a batch file that starts automatically with Windows, although it works correctly, I wish the command prompt window would not remain permanently visible, since the PC is used for other business stuff, and sometimes the user closes by error the window, stopping the socket server.
Of course, thank you very much for your answers and excuse my bad English.
There are several ways to start windows process without visible console window. First you could create windows service, some software support it natively or you could use utility like NSSM. Second: You could start program via task scheduler and tune task properties. Third: You could use utility like CHP to start program without console window. Remember one thing: If you start program without console window (and it is not a windows service), the only way to stop it is taskkill command or GUI Taskmanager.
To initialize the websocket server on a windows machine, without the command prompt just set autoexec.bat to halt_threads 2.

OSX running app acts differently from running on terminal

I have written an app for OSX (Sierra) in Go (lang) with the GUI powered by the Golang QT binding therecipe/qt. When I build the app and run it from the command prompt with command open $(pwd)/myapp.app I get a terminal output while its running, and everything works fine.
When I double click on the app in finder to run it, I obviously don't have access to the console to see debugging, but in parts of the app that work fine in the GUI when I run from console (clicking on things, etc), it crashes the app when run by clicking on it.
I realise people don't know what the app is, and without seeing where in the app it crashes, they can't help me. What I am after is some ideas about debugging it, for instance:
Outputting logs to a text file and tailing the text file to watch as it is written to
Connecting a debugger to the application by the process, perhaps I can discover where it crashes. This doesn't sound straight forward
Is there a way to attach to a console of an application run like this to see what it is outputting?
Any ideas appreciated.
Thanks

Opening a new terminal window from so x application

I have a Mac OS X project (a game using SDL), and for debugging purposes when not running in xcode, I'd like to open up a terminal window that I can send text to and get line input from the user.
Is there a quick way to do this that doesn't involve creating a custom window (which is slightly problematic since the game uses SDL and I don't directly create windows)?
Opening up the standard OS X terminal would be fine, or even connecting to a separate terminal process and then sending output and reading input would also be OK.
The one criteria is that it needs to work when the application is run outside of xcode, or even on machines that don't have xcode installed.
I've spent the last few hours trying to Google this, but my searches are all returning unhelpful results. I'm clearing not seaching on the right keywords.
Thanks.
Actually every app has ability to interact with console, your just need to run it in a proper way (from a terminal or console)
Locate folder with your application. For XCode you can do it in a "Project Navigator" folder "Products", then for your app in context menu press "Show in Finder". For installed application it probably will be in the folder /Applications/. Let it be, for example, /Applications/MyBigProgramm.app.
Open console or terminal make cd to your app folder /Applications/MyBigProgramm.app/Contents/MacOS
There will be an executable file of your app.
Run it from console. After it stdin and stdout will be linked to your app.
Work with stdin and stdout as you want.
UPD 1
A bit of automation.
Create applescript with the following content:
tell application "Terminal" set currentTab to do script
("/Applications/MyBigProgramm.app/Contents/MacOS/MyBigProgramm")
end tell
Save your applescript either as app or script.
Run your base application ("MyBigProgramm") by starting your applescript.
Work with stdin and stdout as you want within your base application.
Watch output in the terminal, type sth in the terminal as input to your base application.

Resources