VS Code - Integrated terminal exited with code 1 - terminal

My VS Code integrated terminal is only toggling up for a second then disappearing with the command Ctrl+`(Tried to change it - still not working :)),
showing the Integrated terminal exited with code 1 error.
Any ideas for fixing it?

I had the same problem on Windows 10. The problem was that I had VSCode running in compatibility mode (Windows 8). If that is that case for you, just uncheck "Run this program in compatibility mode for" checkbox in Compatibility tab of the VSCode properties, click in OK and restart VSCode.

I had the same problem just a few minutes ago, in my case this error was a path consequence, my windows user folder has an accent (c:/users/josé /..) , so, just try to move your project into another folder, like "C:/projects".

Current Solution is using a none-English named Folder as project Folder.
Here is my research:
default value "terminal.integrated.shell.windows": "C:\\WINDOWS\\system32\\cmd.exe"
Following is the debug info in VScode:
terminalInstance.ts:55 Integrated terminal exited with code 1
(anonymous function) # terminalInstance.ts:55
emitTwo # events.js:100
emit # events.js:185
ChildProcess._handle.onexit # internal/child_process.js:204
Following is debug info in Atom:
C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:52
Unable to start terminal process. Win32 error code: 267 Error: Unable
to start terminal process. Win32 error code: 267
at Error (native)
at Server. (C:\Users\mzvast.atom\packages\platformio-ide-terminal\node_modules\pty.js\lib\pty_win.js:67:9)
at emitOne (events.js:90:13)
at Server.emit (events.js:182:7)
at Pipe.onconnection (net.js:1439:8)
(anonymous function) #C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:52
(anonymous function) #C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:126
module.exports.Emitter.simpleDispatch # C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\node_modules\event-kit\lib\emitter.…:25
module.exports.Emitter.emit # C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\node_modules\event-kit\lib\emitter.…:125
(anonymous function) # C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:78emitTwo
# events.js:100
emit # events.js:185
handleMessage # internal/child_process.js:718
channel.onread # internal/child_process.js:444
The win32 error code 267 seem to be,according to microsoft:
ERROR_DIRECTORY
267 (0x10B)
The directory name is invalid.

Close vscode, create a new folder somewhere on your pc, but not inside the directory which was previously opened with vscode. Open this new directory with vscode and then try opening your terminal. If your terminal opens, then the problem was with your previous directory. This happened with me, the directory didn't exist but was listed in my file explorer. Now, whenever your start your terminal, it will start with the same directory which is opened in your vscode. In this case, the directory didn't exist or had same issues, hence the problem.

Important!!
First, try this method.
Create a dummy directory anywhere on your PC, except the present directory that
is open in your Explorer.
Save any thing that is open.
Open the dummy directory that you created File > Open a folder > 'Your Folder'
Try opening integrated terminal using View > Terminal.
If this works, then there's a problem with the directory. Create a new directory and migrate all files to that directory.
If not, then try changing the settings listed here in other answers or check whether VSCode is running in Compatibility Mode or not.

I had the same Exit code 1.. And found the solution as below..
Open the settings on Visual Studio Code and click Edit in settings.json as marked:
Change the terminal.integrated.shell.windows settings on the red marked line as you see:

just uncheck "Run this program in compatibility mode for" checkbox in Compatibility tab of the VSCode properties, click in OK and apply and restart VSCode.

Related

Godot export crash

I am new to godot engine and have started working on a project(i am using gdscript)...
When I run the project as test it works fine(like in the godot engine), but when I export it, it shows the godot logo and then crashes...
This is my godot file system
godot file system
This is the message i am getting in the debug console
error message in debug menu
platform/windows/os_windows.cpp:2905 - Condition "ret == 0" is true. Returned: ERR_CANT_FORK
Please help I have worked hard on this project and if I cant export all that is for nothing
I'm going to transcribe the error image you linked for you:
platform/windows/os_windows_cpp:2905 - Condition "ret == 0" is true. Returned: ERR_CANT_FORK
editor/editor_export.h:251 - Resources Modification: Could not start rcedit executable. Configure rcedit path in the Editor Settings (Export -> Windows -> Rcedit)
Emphasis:
Configure rcedit path in the Editor Settings (Export -> Windows -> Rcedit)
ERR_CANT_FORK means it could not fork start a new process. Which process?
Could not start rcedit executable
If we search Rcedit on Godot's official documentation the following article shows up: Changing application icon for Windows. It says:
Before selecting it in the export options, you will need to install an extra tool called rcedit. You can download it here.
After downloading, you need to tell Godot the path to the rcedit executable on your computer. Go to Editor → Editor Settings → Export → Windows. Click on the folder icon for the rcedit entry. Navigate to and select the rcedit executable.
To reiterate: Configure Rcedit.

Cypress and WebStorm - when a test fails there is a link to the line number that fails - that link is not bringing me to correct line in IDE

What:
After updating to pretty much all Cypress versions 10.x.x, WebStorm stopped or Cypress stopped opening the correct line number for the below scenarios:
Issue:
Where a test would fail an assertion etc. with link to the line in IDE.
Open In IDE inside specific spec it block .
Inside SCREENSHOT: FAILED_LINE_NUMBER it brings me to that line however that's not the line the test actually failed at.
Similar situation when I click on the link pointed out inside SCREENSHOT: GENERIC_BODY_OPEN_IN_IDE -- clicking the link doesn't bring me to the correct it block.
I am fairly certain this is user error but cannot figure it out.
Setup:
Windows 10
Cypress 10.0.3
WebStorm v221.5921.27
cypress runner > Settings > Device Settings > External Editor = Custom C:\Users\me\AppData\Local\JetBrains\Toolbox\apps\WebStorm\ch-0\221.5921.27\bin\webstorm64.exe
Things I have tried:
Wiping cache inside C:\Users\me\AppData\Local\Cypress\Cache and then running npm i cypress
Reinstalling WebStorm
Images:
FAILED_LINE_NUMBER
GENERIC_BODY_OPEN_IN_IDE

Error in publishing to RPubs from Rstudio

I installed the latest version of RStudio (RStudio 1.1.423 - Windows Vista / 7/8/10).
I'm trying to publish to RPubs, but in Global Options does not appear the option for Rpubs.
When I request Publish Document, the following error appears: Error occurred while executing method.
Rprofile:
I entered the command: options (rpubs.upload.method = "internal") at line 25 of Rprofile, but it did not resolve.
The solution is provided by a careful rereading of http://rstudio-pubs-static.s3.amazonaws.com/25030_8e9c9ffc3b3c423d9381d81543423502.html
"Put in options(rpubs.upload.method = “internal”) and no other text at all". Meaning that this line of code is the only code present in the .Rprofile file.
Previously I had been adding the line to a copy of the rest of the Rprofile text. The unnecessary code was the culprit.
I had the same error before. Turns out it was due to having an accent mark in a folder name from my directory (í). I just modified that one folder name and it worked fine.

Unable to start debugging on bash on Windows within Visual Studio Code

I have installed WSL(Ubuntu on Windows) and gcc/gdb, and open a directory in Visual Studio Code, then click Debug Menu | add configuration, select C/C++:(gdb) Bash on
Windows launch, press F5,get the message:
Unable to start debugging, Unable to establish a connection to GDB, ...
output in debug console:
Starting: "C:\Windows\sysnative\bash.exe" "/usr/bin/gdb --interpreter=mi"
"C:\Windows\sysnative\bash.exe" exited with code -1 (0xFFFFFFFF).
I don't have enough points to leave a comment, but could you paste your
configuration in launch.json? One issue I have seen is that "/usr/bin/gdb --interpreter=mi" gets treated as single string instead of calling gdb with an extra flag. Updating my configuration with the following flag in pipeArgs fixed the error for me.
"configurations": [
...,
"pipeTransport": {
"debuggerPath": "/usr/bin/gdb",
...
"pipeArgs"; ["-c"],
}
]

Custom debug command in Visual Studio using a Makefile project

I have a Makefile-powered project in Visual Studio 2010 (uses NAnt, in fact, but that's beside the point).
The output of the build process is a .elf file, and I have a separate, non-VStudio debugger which can be run on that .elf file to debug it.
Building works fine, but when I click the 'debug' button (little green triangle), VStudio fails with "Unable to start program 'XXX.elf'. The specified file is an unrecognized or unsupported binary format"
I'm guessing VStudio is just trying to 'run' the .elf as though it were an .exe, and failing.
What I really want VStudio to do is run "my_debugger.exe XXX.elf" when I press the debug button.
I have tried adding a file association with .elf=>my_debugger.exe
I have updated PATHEXT appropriately as well, and run VStudio under those changes.
Still no luck.
Isn't there somewhere in VStudio where you can specify a custom debug command? I thought there was, but can't find it.
I could just have the build process output a .bat file or something I guess, but this seems silly.
As Jim mentioned you can specify which app to start on run in the project settings (Command field). If you place a debugger there you can pass down your executable as an argument to the debugger being launched (Command Arguments field). This way you can launch the debugger which in turn will launch your executable if the debugger expects any commandline arguments.
MinGW on Windows example:
Command: gdb.exe; Command Arguments: Path\ToMyApp\whatever.exe
will start gdb.exe, gdb.exe will open whatever.exe, parse the debug info and wait for debug instructions.
Command: msys.exe; Command Arguments: gdb.exe Path\ToMyApp\whatever.exe
will start msys.exe, msys.exe will execute "gdb.exe Path\ToMyApp\whatever.exe"
Look at the project properties. Do you have a Debug tab which has a Start Action section giving three choices? Those choices would be: ( ) Start project, (x) Start external program: ... ( ) Start browser with URL.
You can also set the command line arguments and working directory.
Cf. How to: Change the Start Action for Application Debugging

Resources