How to debug envoy unit tests on VScode mac - visual-studio-code

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!

Related

How to config CDT debug for cygwin?

I am new to eclipse CDT with cygwin. I just created a HelloWorld C++ project.
The built exe works in cygwin.
If I click the exe in file in file explorer, it says that it can not find cygwin1.dll. This error can be resolved by adding C:\cygwin64\bin to the Path env variable.
If I try to debug directly, I got the following errors:
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Error creating process /cygdrive/c/WINDOWS/system32/C:/Users/Cheng_g15klso/Documents/Proj/HelloWorld/C:/Users/Cheng_g15klso/Documents/Proj/HelloWorld/Debug/HelloWorld.exe, (error 2).
The above diagnosis seems to point to lacking of C:\cygwin64\bin, so I add C:\cygwin64\bin to Path env variable in the env var tab of the debug config, but the result is the same.
My questions:
How to solve this issue?
Where to find a list of error to decode error 2?
It seems that the latest gdb above version 9.2-1 is wrong: https://www.eclipse.org/forums/index.php/t/1105969/
I have downgrade my gdb and gcc for cgywin to cure the issue

Cypress / Visual Studio Code / Cypress failed to start

I am junior QA Tester, started working with Cypress and IDE Visual Studio, after updating Cypress 5.2.0, I got a strange error like the following:
It looks like this is your first time using Cypress: 5.2.0
✖ Verifying Cypress can run /Users/viktoriiahanke/Library/Caches/Cypress/5.2.0/Cypress.app
→ Cypress Version: 5.2.0
Cypress failed to start.
This is usually caused by a missing library or dependency.
The error below should indicate which dependency is missing.
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
----------
Command was killed with SIGKILL (Forced termination): /Users/viktoriiahanke/Library/Caches/Cypress/5.2.0/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=563
----------
Platform: darwin (19.6.0)
Cypress Version: 5.2.0
I have already tried to delete Cypress and install it with npm from the beginning, but Cypress itself is working, when I download it manually , but when I try to start it in console or in Visual Studio Console it is not opening, writing me that I miss dependencies like above.
Did anyone have such problem before?
Run this command in the terminal export NODE_TLS_REJECT_UNAUTHORIZED=0
and then try installing again.
I think it had been updated from a previous version, 3.1.3. Go into cache and delete all versions of cypress then re-install.
Maybe that there are missing some vital folders/files like integration, cypress.json... Try to run the 'npm install' command in the terminal for installing the dependencies.
Also, maybe if you start from an existing project, it will be fine (run npm install command also).

How to fix ' Disconnected, because no message in 10000 ms.' error while trying to run karma unit test?

I am getting 'Disconnected, because no message in 10000 ms' error while trying to run karma unit tests. This error triggered only after the installation of webdriver-manager ( to run protractor) and ran unit tests successfully before this installation.
I assumed that the error might be hitting since webdriver is up and running. So,I passed command 'webdriver-manager shoutdown' to stop it. but,it showed that no server is up and running.
My requirement is to run both protractor functional test and karma unit tests in same machine without any error.
Found the solution for this issue by myself.
Solution: Install angular cli using the command 'npm install -g #angular/cli'.
I am able to execute both karma unit tests and protractor functional tests in my system without any issue after installing angular cli.

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.

gradle eclipse integration -

I'm using a eclipse 4.2 distribution and have installed the gradle eclipse integration plugin from springsource.
When I initially try to create a quick java project with the wizard I get the following error:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at C:\devtools\gradle-1.4\docs\userguide\gradle_daemon.html
Please read below process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Could not fetch model of type 'HierarchicalEclipseProject' using Gradle installation 'C:\devtools\gradle-1.4'.
When I run gradle build in the command line everything's fine.
Any ideas how i could get this to work?
Cheers
Since you can run gradle in command line successfully, you would want to try to use that gradle in the eclipse plugin.
Set Preference -> Gradle -> Gradle Distribution -> Folder to your own gradle distribution that runs fine.