With following setup:
ubuntu VM, running eclipse C/C++ IDE
ubuntu 16.04 docker container with PTXdist build system and gcc toolchain
source code in VM filesystem mounted to docker container
remote target connected via SSH
What works and what not:
PTXdist: build project from command line - OK, works
make: build project from command line - OK, works
gdb: from command line - attach to binary in running container works
eclipse:
debug configuration calls python script which executes docker gdb in running container
FAILED with timeout on gdb version
It looks like the gdb machine interface is not reachable from eclipse while checking the gdb version (as a connection test?).
Already tried to attach STDIN,STDOUT to the container, but without success.
Does anyone have a hint to configure this setup?
P.S. The next step will be to switch from ubuntu VM to Windows 10 (with Docker Desktop + WSL2)
Related
Is it actually possible to configure the eclipse IDE to use the gdb debugger inside a docker container to do remote debugging?
So
Eclipse IDE is on my host
The cross toolchain and debugger are inside my container
The debug binary runs on a remote device.
I am configuring "C/C++ Remote Application" in Eclipse and my gdb path is set to
docker run -it --rm --privileged -p 5000:5000 docker-gdb
After hitting the debug button in Eclipse the gdbserver is starting and listening on port 5000 on the target system. The entrypoint of my image is gdb itself. Inside a shell, the remote debugging is working fine.
But Eclipse gives the error "the input device is not a TTY" or "Timed out trying to launch GDB" when the docker command runs with "-i" instead of "-it".
When trying to open a new Remote-WSL window I run into an error during the "Installing VS Code Server in WSL (details): Installing WSL components" step. Appears it can not find the wslpath command.
I have tried looking at my PATH variables, I didn't see wslpath anywhere there nor do I know what the path should look like? I also tried reinstalling my linux distribution but that did not help.
[2019-07-09 12:23:39.266] Launching C:\Windows\System32\wsl.exe bash -c "'$(wslpath -u 'c:/Users/laida/.vscode/extensions/ms-vscode-remote.remote-wsl-0.38.8/scripts/wslServer.sh')' '0f3794b38477eea13fb47fbe15a42798e6129338' 'stable' '.vscode-server' 'C:/Users/laida/AppData/Local/Temp/vscode-remote-wsl/0f3794b38477eea13fb47fbe15a42798e6129338/vscode-server-linux-x64.tar.gz' 0 " in c:\Users\laida\.vscode\extensions\ms-vscode-remote.remote-wsl-0.38.8
[2019-07-09 12:23:39.562] /bin/bash: wslpath: command not found
[2019-07-09 12:23:39.562] bash: : command not found
[2019-07-09 12:25:10.024] VS Code Server for WSL failed to start. No messages received for 90s
I just ran into this today when starting up Remote - WSL. I am using an older Windows 10 version as #Biswapriyo noted, so I resolved it by installing wslpath from https://github.com/laurent22/wslpath
(Note: I also had to install php for that to work).
After that I was able to start Remote - WSL
I imagine that installing a newer Windows 10 version would probably work as well, but I'm unable to do that (managed image) and even if I were able that's kind of like killing an ant with a sledgehammer.
I am developing IoTEdge module in VisualStudio Code and following This Link. While using the option
Build IoT Edge Solution
i am getting the error at step 10
useradd is not recognized as an internal or external command
OS: Windows10
Looks like your Docker is running in Windows container mode. Please update ${MODULES.modulename.amd64} in your deployment.template.json to ${MODULES.modulename.windows-amd64}.
How to uninstall eclipse che completely on mac osx?
Used mac osx installer to install binary. Seems che is always running on 8080 even killed the process and stopped docker.
https://eclipse.org/che/
I couldn't find the better way for uninstall on Mac but you can stop the Tomcat embedded in Eclipse Che.
The path is /Applications/EclipseChe3.12.5.2.app/Contents/Resources/eclipse-che/tomcat/bin
Next step is stop the Tomcat instance and finally delete the folder EclipseChe3.12.5.2.app because that's my Eclipse Che version.
So, I hope this is helpfully for you
If you are using Docker the process is different.
Get the list of active instance in Docker by running the following command in Terminal: docker ps
Then you can stop the running instance by running in docker stop XXX where XXX is the name of the running container instance. You may have more than one container instance to stop.
Then you can remove it by running docker rm XXX and then you can list images that are present on your system by running docker images
If you want to completely remove Che, then pickup for the images list the ones that are related to che and remove them by running the following command: docker mi image_name
Last command to stop docker on your mac will be docker-machin stop environment_name. If you do not know the name of the running environment you can figure it out by running docker-machine ls
I have a program that I'd like to run remotely under Valgrind using the Linux Tools remote Valgrind profiler.
I normally debug remotely on a headless server (which has special hardware, so it has to be done remotely on that machine) using RSE, which works fine. Both my machine and the target are Linux machines.
I am now trying to get Valgrind working through Eclipse using the Linux Tools plugin. I have Valgrind 3.10 installed on the remote target machine, and I can run it up manually (outside of Eclipse):
Remotely:
valgrind --vgdb=full --vgdb-error=0 /path/to/app --args
vgdb --port=2345 --pid=XXXX
Locally, connect with gdb with target remote host:2345.
However, I can't work out how to get the "Valgrind (remote)" Eclipse tooling to emulate this, aping the "RemoteTools" setup shown here: .
When I write in a "To:" executable that starts with "rse:/", I get an error in the Profiling Tools settings window top corner saying [Valgrind Options]: Couldn't determine version of Valgrind. What should I write here to get a working remote Valgrind connection?
Haven't found more recent posts on the topic, maybe it will be useful for somebody. I also didn't manage to use remote valgrind plugin with RSE. Seems like only dstore connection type will work for Linux Tools remote valgrind, because SSH or FTP didn't work for me. rseserver requires Perl and Java, and I didn't have them on my target.
I had to use this complicated solution via Launch Group combining this and this solutions. Preconditions: valgrind and vgdb are installed on remote target.
Write a script start_remote_valgrind.sh
set -x
remote_ip=192.168.7.2
remote_port=2222
app_name=test_app
remote_dir=/usr/local/bin/
local_dir=/home/project_name/
ssh -T root#$remote_ip killall -9 vgdb
ssh -T root#$remote_ip killall -9 valgrind
scp $local_dir$app_name root#$remote_ip:$remote_dir$app_name
ssh root#$remote_ip valgrind --vgdb=full --vgdb-error=0 --leak-check=full -v $remote_dir$app_name &
sleep 1
ssh root#$remote_ip vgdb --port=$remote_port
Create debug configuration Run->Debug Configurations->C/C++ remote application:
2.1 On themain tab set the project name and app binary
2.2 In the bottom of the configuration window click "Select Other" link and select "GDB (DSF) manual remote launcher"
2.3 On Debugger tab set GDB debugger for you target platform, command line script .gdbinit.
2.4 On Debugger->connection tab set TCP connection, remote ip and port.
Create external tool Run->external tools->external tools configuration...
Create Launch Group Run->Debug Configurations->Launch Group
external tool must be in Run configuration, remote gdb in Debug. The benefit of this approach is that remote valgrind output is printed in Eclipse console, so you don't need to launch vgdb manually in a separate console and see messages in separate window.