Support for spawning detached IDE processes from Powershell

Issuing either:

rider ProjectFolder

or

rider .\Project.sln

from a Powershell/Terminal window currently opens the IDE attached to PS/Terminal, outputting start up logs and any other logs generated from the process. As far as I can see, there's no publicly documented way to have it so the IDE can be spawned as a detached process from the terminal, in a similar fashion to VS Code's “code . ” command. 

Even if it is not the default behaviour, the inclusion of something like a “-detach" arg would be ideal.

0
1 comment

This is default behavior of terminal as the process launched by terminal runs as child process of terminal. To overcome this, the common practice is use "start" command or "Start-Process" in PS.
 
When running Rider in cmd, it is actually calling "\Program Files\JetBrains\JetBrains Rider 2024.3.4\bin\rider.bat" 

In this script, it does not run Rider executable directly, but run "java.exe" which invokes Rider then. That's why you see output in console as java runs in console context.

Solution
Please consider either of the following ways to fulfil your requirements:

  • Create your own script to use "start” command, then save it and include the path in "PATH" environment variable.

Here is an example for your reference:

@echo off
start "" "C:\Program Files\JetBrains\JetBrains Rider\bin\rider64.exe" "%~1”

Usage(“rider64” here is my custom script name):

  • Another simple way is to install JetBrains Toolbox. After installation, it automatically creates a script which allows you to run rider in shell. 

The script name is “rider” too. You need to edit “path” environment variable, and set/move the location of this script up so it has higher priority than the default “rider.bat” shipped with Rider. 

The default location is "C:\Users\<UserName>\AppData\Local\JetBrains\Toolbox\scripts”

You can also set a custom script name or change the location: Open toolbox -> click three dot button next to Rider -> Settings: 

Let me know if you have any concern. 

0

Please sign in to leave a comment.