Code runner runs javascript in terminal but does't work in otput - vscode-code-runner

Hi when I try to run javascript with code runner i get only:
"[Running] node "/home/lukasz/JavaScript/app.js"
[Done] exited with code=0 in 0.11 seconds"
without any actual output.
When I switch to run in terminal everything works fine. Any ideas how to fix it?
[Run in terminal][Run in output]
I compared settings of execution map with other on osx which is working perfectly and can't see any difference.

Related

How to debug envoy unit tests on VScode mac

I am working with envoy (https://github.com/envoyproxy/envoy). I got this project to build and debug on mac in VSCode using --spawn_strategy=standalone --genrule_strategy=standalone flags when I do bazel build.
However, when I try the same with bazel test, I can't get it to run without sandbox. When I run the command:
bazel test //:test_name --spawn_strategy=standalone --genrule_strategy=standalone
It runs the whole test and shows which tests passed and which ones failed.
But when I run the binary from /bazel-bin/ as ./test_name, it gives me an error saying: Caught Abort trap: 6, suspect faulting address. I am assuming this is because of some missing env variables created in sandbox - I have also tried just using --strategy=TestRunner=standalone. Is it possible to run it standalone? so that I can debug in an IDE such as VScode. Thank you!

Eclipse (2018-09) CDT project with Cygwin, can't debug the binary

It seems that everything cygwin-related configured and works fine in my Eclipse project, for example Eclipse is able to invoke 'make' or 'gcc', and can even run the compiled binary and show the output in the Eclipse console window.
However, when I try to debug my binary within Eclipse, I get the following error:
Error in final launch sequence:
Failed to execute MI command:
-exec-run
Error message from debugger back end:
During startup program exited with code 0xc0000135.
Failed to execute MI command:
-exec-run
Error message from debugger back end:
During startup program exited with code 0xc0000135.
During startup program exited with code 0xc0000135.
I do able to launch gdb from my Cygwin console, so it is installed correctly (I assume). But why it fails when I try to use it from Eclipse?
For my case, as you say, it turns out that adding the Cygwin bin folder to the PATH variable solves this problem.
I use Eclipse 2020-06 and Cygwin 64bit on Win7 64bit. And installing Cygwin doesn't change the PATH variable currently.
But it is also confused to me that "build" and "run" work fine in Eclipse whithout the Cygwin bin in PATH.

Could not run VS Code on CentOS 7 with x2go

I have installed the latest version of VS Code on CentOS 7.
However when I try to run VS Code, it loads for some time trying to open, but then nothing happens, no errors, nothing.
I have tried to installed both trough rpm package and zipped files, but got the same result in both cases.
I'm using x2go to connect to my CentOS 7.
Add the following line to the file /etc/x2go/x2goagent.options:
X2GO_NXAGENT_DEFAULT_OPTIONS+=" -extension BIG-REQUESTS"
Then restart the server and try again.
I had the same problem and added the --verbose flag to get more info (see below). Googling for the "gl_surface_glx.cc" error brought me to https://github.com/atom/atom/issues/4360 which contains the above workaround. VS Code now works for me on CentOS7 with X2GO.
Without this workaround the following error is seen (using the --verbose flag):
$ code --user-data-dir=/home/user1646217
--verbose [19526:0719/091952.335817:WARNING:audio_manager.cc(317)] Multiple instances of AudioManager detected
[19526:0719/091952.335923:WARNING:audio_manager.cc(278)] Multiple
instances of AudioManager detected
[19549:0719/091952.363736:ERROR:gl_surface_glx.cc(411)] GLX 1.3 or
later is required.
[19549:0719/091952.363836:ERROR:gl_initializer_x11.cc(130)]
GLSurfaceGLX::InitializeOneOff failed.
[19549:0719/091952.366430:ERROR:gpu_child_thread.cc(327)] Exiting GPU
process due to errors during initialization

Running Mocha Test - indentation error

I am running some mocha tests for a mean.js app and I get a large number of indentation errors and then a "Mocha exploded!" error.
I fixed it this morning but messed with it more and undid my fix by accident. I cannot remember exactly how I fixed it but I was messing with npm install and making sure the mongoDB database was correct. I checked that my mocha version is up to date which it is.
Any suggestions with what to turn to next that could be the issue would be greatly appreciated.
I attached the terminal errors below.
Image 1: executing grunt test --force
Image 2: indentation errors
Image 3: "Mocha exploded!" error
The issue was an extra curly bracket in one of the test files that mocha was running through. This solved the mocha exploded issue as well as all of the indentation issues.
Check the poststest script and remove it if necessary.
A script like the below will launch Eslint(a tool that analyses Javascript code) after all tests run:
"script": {
"lint": "eslint .",
"posttest": "npm run lint"
}

Protractor / Chrome - UnknownError: The process has not exited yet therefore no result is available

Trying to run a Protractor test but am receiving the following command line error when trying to test in Chrome.
UnknownError: The process has not exited yet therefore no result is available ...
The test successfully runs in Firefox, i.e. when the protractor.conf.js file is set as such:
capabilities: {
'browserName': 'firefox'
}
I'm currently using ChromeDriver 2.10, which seems to have something to do with the issue (https://github.com/angular/protractor/issues/1424). However, I'm unclear how to configure Protractor to use a different version of ChromeDriver.
So, reverting to ChromeDriver 2.9 was as easy as downloading it from here (http://chromedriver.storage.googleapis.com/index.html?path=2.9/) and extracting the zip into /usr/local/lib/node_modules/protractor/selenium.
That fixed the immediate issue of not being able to run the test in Chrome. Still waiting on a fix for 2.10, I suppose.