VS Code- Code Runner Extension: Adding support for new language wont output to output - vscode-code-runner

(this looks like a similar issue to this but the solution there was to just tell code runner to run in the terminal-which does work- but the whole thing with code runner is it looks alot cleaner from the "output" page. also this should work it just doesnt for some reason)
I'm trying to integrate coconut in to the "Code Runner" VS Code extension so that the native "run code" command will automatically run "coconut-run "
In settings.json:
"code-runner.executorMapByFileExtension": {
".coco": "coconut-run",
}
In powershell terminal it runs fine
PS C:\> coconut-run "c:\test.coco"
1
But in code runner heres what I see in the "output" section:
[Running] coconut-run "c:\test.coco"
but just gets stuck forever- looks like this after I cancel it
[Done] exited with code=1 in 23.41 seconds
any help is appreciated thanks

Related

Powershell DSC - MSFT_RoleResource

I have a problem related to MSFT_RoleResource, I have recovered a DSC script that you can find below:
The compilation in .mof works as shown below:
Once the compilation is finished I want to make an Azure policy, the compilation works as shown below ( it's very strange because when i compile the script i have error who say replace the PSDesiredStateConfiguration By PSDresource):
I want to test it afterwards but it sends me this error:
Can you help me?
Thank you so much
I tried to redo the manipulation on a blank machine, uninstall Powershell 7 and reinstall .

VSCode terminal not open (exit code : 3221225794)

When I open terminal in VSCode, i saw this error and not open terminal tab.
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" terminated with exit code: 3221225794.
These are the solutions I have found from my research
1st Option:
Run VS Code as aadministrator
2nd Option:
Configure terminal options/args for Powershell
3rd Option:
Please check the following link, this link provide some VS Code trouble shooting steps
https://code.visualstudio.com/docs/supporting/troubleshoot-terminal-launch
4th Option:
Use 'cmd.exe' instead of 'powershell.exe' by following these steps here: https://stackoverflow.com/a/59416769/2015398

How to fix "mypy failed with error: Daemon has died . See Output panel for details." error in VS Code

I'm using the Mypy extension in VSCode, and it's giving me the error mypy failed with error: Daemon has died . See Output panel for details.
When I open the Output panel, it doesn't give me much more info than just telling my that it tried to run dmymy.EXE but that it had died.
How do I get the Mypy extension working again?
I've tried searching for this error on Google to no avail, and I've also tried rebooting VSCode, which gives me the same error every time.
Open up a Command Prompt (on Windows) or Terminal (non-Windows). Copy/paste the location of the dmypy.EXE script that it tried to run (from the output panel). Put start after the script. This will start the daemon.
The command looked like this for me:
C:\Users\MyUsername\AppData\Local\Programs\Python\Python38\Scripts\dmypy.EXE start
Now, reboot VS Code (I'm not sure if this is even needed), and the mypy extension should work again.

VSCode task in WSL environment, terminal keeps exiting when trying to run shell script

NOTE
I've had to remove like two chunks of this post because stack overflow kept interpreting it as code when it isn't and it wouldn't let me post, I'll just make a screenshot of what the post is supposed to look like and post it here. Read this instead.
Summary
I was finally trying to learn how to use VSCode tasks and so I copied the first task example from here and created a shell script at scripts/test.sh which contains simply "echo foo". I also commented out the windows alternative script because I exclusively use WSL/Bash. Whenever I run the task I receive a "The terminal process terminated with exit code: 1" error message, which is no help whatsoever.
Testing
I ran various tests and I have no idea why this isn't working.
Proving The Task Is In The Correct Directory & In WSL
First I thought maybe the task isn't running in WSL or that the directories are out of sync, so I changed the commands to see what happens.
First, I changed it to:
"command": "pwd",
and the output was "/mnt/f/.../.../tmp/tmp.1BitOIA78E" (... are for some arbitrary path) so clearly I concluded I was running on WSL and in the right path.
Proving the Script is Executeable
Next I thought, maybe the script I'm trying to run isn't executable or something to that affect, so I changed the command to:
"command": "stat ./scripts/test.sh",
and I got the following output which shows, the file exists, it's executeable & can be accessed through "./scripts/test.sh" from whatever directory the Task is set to on construction
I run the task by typing ctrl-shift-P to open the menu, select "run tasks" and then select 'My First Task'.
Note: I don't think this is a settings problem. There're no workspace settings setup (because this is just me testing) & just in case, you can find my current user settings here which I updated immediately before posting this.
Expectations
What I'd like is either:
Someone to tell me how I can access the stderr and stdout log of the shell upon startup so I can get some actually helpful information as to why this is happening.
Someone to tell me why I can run a script perfectly fine outside of a task, but within a task it completely fails.
Whats also of note is that the script isn't the problem here. Leaving it completely blank, doesn't stop the terminal from straight up crashing.

How to exit Command Prompt after launching VSCode

Here are the steps to reproduce the problem:
Open Command Prompt. ( cmd )
Run code . to launching VSCode.
Type exit and hit Enter in the Command Prompt.
Then the Command Prompt is just paused. I have to wait VSCode exit to let Command Prompt window closed.
Does anyone know why? How can I close Command Prompt window without exiting VSCode?
I found a solution here: https://github.com/Microsoft/vscode/issues/6608. It involves changing the code.cmd file (usually found under "C:\Users\yourUsername\AppData\Local\Programs\Microsoft VS Code\bin").
Changing the fifth line in that file from
call "%~dp0..\Code.exe" "%~dp0..\resources\app\out\cli.js" %*
to
start "" "%~dp0..\Code.exe" "%~dp0..\resources\app\out\cli.js" %*
will make the cmd window close right away. But that change will apparently break some other things (specifically the --wait flag), so I figure it's wiser to leave the code.cmd file alone.
Instead I made a copy ("codeNoCommandPrompt.cmd") right beside it and changed the line in there. That works fine for my usecase, namely having VS Code start on a specific folder alongside a bunch of other programms via a script.
I just tested it (using the latest VSCode 1.24.1), and it does work: the CMD shell session closes immediately when typing "exit".
Try calling the code.cmd script with its full path to see if the issue persists:
"C:\Program Files\Microsoft VS Code\bin\code.cmd" .
Try also the same command after having simplified the PATH (for testing)
set PATH=C:\Program Files\Microsoft VS Code\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
code .
Simply use this
code . && exit
Check your PATH variable, maybe you have duplicate entries for VS Code
Go System Properties -> Envieronment variables -> select PATH variable then click Edit.
Remove "C:**\Microsoft VS Code".
Leave intact "C:**\Microsoft VS Code\bin"
This happens when you reinstall vscode with "add to PATH" checked