open wt from intellij idea issue #9107

Closed
opened 2026-01-31 01:46:13 +00:00 by claunia · 6 comments
Owner

Originally created by @Ikki-Dai on GitHub (Jun 18, 2020).

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable):
WT : 1.0.1401.0
Microsoft Windows [版本 10.0.18363.752]

Any other software?

intellij idea

Steps to reproduce

set console in intellij idea

  1. File -> Settings -> Tools ->Terminal
  2. input shell path : wt -p "Windows PowerShell" , then APPLY
  3. click Terminal tab which at the bottom of window

Expected behavior

wt window pop out and start at project dir

Actual behavior

show error as below in Terminal tab

Cannot open Local Terminal
Failed to start [wt -p "Windows PowerShell"] in E:/xxxx/xxx

Error running process: CreateProcess failed. Code 2

See your idea.log (Help | Show Log in Explorer) for the details.
Originally created by @Ikki-Dai on GitHub (Jun 18, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] Windows Terminal version (if applicable): WT : 1.0.1401.0 Microsoft Windows [版本 10.0.18363.752] Any other software? intellij idea ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> set console in `intellij idea` 1. File -> Settings -> Tools ->Terminal 2. input shell path : `wt -p "Windows PowerShell" `, then `APPLY` 3. click `Terminal` tab which at the bottom of window # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> wt window pop out and start at project dir # Actual behavior show error as below in `Terminal tab` ``` Cannot open Local Terminal Failed to start [wt -p "Windows PowerShell"] in E:/xxxx/xxx Error running process: CreateProcess failed. Code 2 See your idea.log (Help | Show Log in Explorer) for the details. ``` <!-- What's actually happening? -->
claunia added the Needs-TriageNeeds-Tag-FixNeeds-AttentionProduct-Terminal labels 2026-01-31 01:46:13 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jun 18, 2020):

Does idea.log have anything relevant in it?

As an experiment, does opening another windowed application, like notepad as the "shell" work? I'd bet that because the Terminal isn't a console application, IntelliJ prevents it from launching as the "shell"

@zadjii-msft commented on GitHub (Jun 18, 2020): Does `idea.log` have anything relevant in it? As an experiment, does opening another windowed application, like `notepad` as the "shell" work? I'd bet that because the Terminal isn't a _console_ application, IntelliJ prevents it from launching as the "shell"
Author
Owner

@Ikki-Dai commented on GitHub (Jun 18, 2020):

yes, as idea.log print java.io.IOException: Couldn't create PTY
but while i filled in just wt, it works as expected, can pop up windows terminal

@Ikki-Dai commented on GitHub (Jun 18, 2020): yes, as idea.log print `java.io.IOException: Couldn't create PTY` but while i filled in just `wt`, it works as expected, can pop up windows terminal
Author
Owner

@zadjii-msft commented on GitHub (Jun 18, 2020):

Huh, that's certainly curious. Does it work with another application with commandline arguments, maybe something like powershell --noprofile?

Maybe they're internally escaping the commandline weirdly. Does something like wt -d c:\users work? Or even wt -d .? I'm thinking that the " in the commandline might be confusing IntelliJ

@zadjii-msft commented on GitHub (Jun 18, 2020): Huh, that's certainly curious. Does it work with another application with commandline arguments, maybe something like `powershell --noprofile`? Maybe they're internally escaping the commandline weirdly. Does something like `wt -d c:\users` work? Or even `wt -d .`? I'm thinking that the `"` in the commandline might be confusing IntelliJ
Author
Owner

@fmajestic commented on GitHub (Jun 19, 2020):

You need to add .exe to wt and quote it.
To start in the project folder, add -d .

Full command:

"wt.exe" -p "Windows PowerShell" -d .

I used to have the same problem trying to run bash in the integrated terminal. Can't remember where i found this fix, it was ages ago.

For reference, I am running:

IntelliJ IDEA 2020.1.2 (Ultimate Edition)
Build #IU-201.7846.76, built on June 1, 2020
@fmajestic commented on GitHub (Jun 19, 2020): You need to add .exe to wt and quote it. To start in the project folder, add `-d .` Full command: ``` "wt.exe" -p "Windows PowerShell" -d . ``` I used to have the same problem trying to run bash in the integrated terminal. Can't remember where i found this fix, it was ages ago. For reference, I am running: ``` IntelliJ IDEA 2020.1.2 (Ultimate Edition) Build #IU-201.7846.76, built on June 1, 2020 ```
Author
Owner

@DHowett commented on GitHub (Jun 19, 2020):

Thanks for the info! Looks like something we don’t have control over :) so I’m going to close this out.

@DHowett commented on GitHub (Jun 19, 2020): Thanks for the info! Looks like something we don’t have control over :) so I’m going to close this out.
Author
Owner

@Ikki-Dai commented on GitHub (Jun 19, 2020):

@fmajestic thanks for ur solution

@Ikki-Dai commented on GitHub (Jun 19, 2020): @fmajestic thanks for ur solution
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9107