Skip to content
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

Integrated Terminal crashes on startup #8001

Closed
ghost opened this issue Jun 22, 2016 · 16 comments
Closed

Integrated Terminal crashes on startup #8001

ghost opened this issue Jun 22, 2016 · 16 comments
Assignees
Labels
info-needed Issue requires more information from poster terminal General terminal issues that don't fall under another label

Comments

@ghost
Copy link

ghost commented Jun 22, 2016

  • VSCode Version: 1.3.0-insider
  • OS Version: Windows 10 Enterprise

Steps to Reproduce:

  1. Menu 'View'
  2. Submenu 'Views'
  3. Click on 'Integrated Terminal
    2016-06-22
    '
@dbaeumer dbaeumer added the terminal General terminal issues that don't fall under another label label Jun 22, 2016
@Tyriar Tyriar added the info-needed Issue requires more information from poster label Jun 23, 2016
@Tyriar
Copy link
Member

Tyriar commented Jun 23, 2016

@profabe can you open dev tools (Help > Toggle Developer Tools) and check for any errors in the console?

@ghost
Copy link
Author

ghost commented Jun 23, 2016

@Tyriar many thanks for your quick response. Please see this screenshot.
capture

@Tyriar
Copy link
Member

Tyriar commented Jun 23, 2016

Do you have anything in your user settings.json file?

Also can you check what the %COMSPEC% environment variable points at?

@ghost
Copy link
Author

ghost commented Jun 23, 2016

Please see the following screenshots.
capture2
capture

@Tyriar
Copy link
Member

Tyriar commented Jun 23, 2016

Does the same thing happen when you add this setting?

"terminal.integrated.shell.windows": "C:\\Windows\\system32\\cmd.exe"

@ghost
Copy link
Author

ghost commented Jun 23, 2016

Still happens...
capture

@Tyriar
Copy link
Member

Tyriar commented Jun 24, 2016

Last thing I can think of is try using the 64 bit cmd which is at:

"terminal.integrated.shell.windows": "C:\\Windows\\SysWOW64\\cmd.exe"

Unfortunately this is a bit tricky to debug due to the fix for #6469

Does this also happen on stable, or just insiders?

@ghost
Copy link
Author

ghost commented Jun 24, 2016

It happens in both stable and insiders. Please note I just updated them to the latest version and applied the setting regarding 64 bit cmd . I also updated the OS. The error message seems to be different now:

vscode

vscodeinsiders

capture

@ghost
Copy link
Author

ghost commented Jun 24, 2016

Is there a Developer's Guide available to set up the environment? Perhaps debugging on my machine can help solving that issue.

@Tyriar
Copy link
Member

Tyriar commented Jun 24, 2016

@profabe that won't help much beyond what you can already do. The terminal process (terminalProcess.js), the thing that's crashing, cannot be debugged as it's running in a different process.

Something you could do is make sure that ENV in [terminalService.ts' createTerminalProcess function](https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts#L187) is being filled as expected, in particular the PTY*environment variables. You can do this through devtools (Help > Toggle Developer Tools) by adding a breakpoint increateTerminalProcess`.

You can see in terminalProcess.js that %PTYSHELL% is called, passing in the args %PTYSHELLARG1%, %PTYSHELLARG2%, ... and the current working directory is set to %PTYCWD%.

@ghost
Copy link
Author

ghost commented Jun 24, 2016

I discovered somethign odd, when debuggng: I can not set a breakpoint at line 146 and 147. Only before and after (sourcemap issue?). Also the env variables are not available in the watch view Did I do something wrong? By the way: This screenshot was taken with stable,

capture

@Tyriar
Copy link
Member

Tyriar commented Jun 24, 2016

I've experienced some issues before with sourcemaps, maybe you could try looking at the .js file and try using the variable name used there?

@ghost
Copy link
Author

ghost commented Jun 25, 2016

The debugger only works in *.ts files not *.js files. I also tried to add some console.log statements, but the Developer Tools don't allow saving. Electron seems to be a biest in that matter. Can I somehow build a custom Visual Studio Code with these console.log statements in it?

capture

@Tyriar
Copy link
Member

Tyriar commented Jun 27, 2016

@profabe you can edit the editor files on the OS in an editor that has admin access. You can always build a developer build, it may be more work getting it working though.

@ghost
Copy link
Author

ghost commented Jun 27, 2016

@Tyriar thanks for the hint - i managed to console log the variables:

  • PTYSHELL: C:\Windows\SysWOW64\cmd.exe
  • PTYCWD: c:\Users\Fabian Wohlschläger\Documents\Code\aspnetcore-workshop\MyNewApp

Both paths exist. Does this help to analyse the error?

@Tyriar
Copy link
Member

Tyriar commented Jun 27, 2016

Great thanks. This is a duplicate of #7727 due to the ä. Pretty sure it's an upstream pty.js/winpty issue.

@Tyriar Tyriar closed this as completed Jun 27, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster terminal General terminal issues that don't fall under another label
Projects
None yet
Development

No branches or pull requests

2 participants