- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi:
I used vscode and eclipse to try remote debugging, when I started with gdbserver --multi, both vscode and eclipsep configured remote connection to gdbserver for remote debugging didn't work, it reported the following error, I googled it, there is no relevant answer that can really solve this problem. So I want to know clearly if this kind of remote debugging with --multi is not supported on both vocode and eclipse, and if there is a solution, please tell me how to solve this problem.
vscode and eclipse configuration gdb are normal configuration,
vscode remote debugging configuration in intel official website has related documents,
eclipse debugging configuration in another post I posted
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for posting in Intel Communities.
Could you please provide us with the below details to investigate more on your issue?
- Operating System details.
- Eclipse IDE & VS Code version.
- Steps to reproduce ur issue using VScode & Eclipse.
- Are you working on a C++ or DPC++ application? if possible could you provide us with a sample reproducer code?
- the version of C++/DPC++ compilers you are using.
Thanks & Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi:
1. OS: Centos OS 8.3
2. Eclipse IDE: 4.20
2.1. VS:1.65.1
3.1 Re-step with vscode
First you need to prepare 2 servers,like c1 and c2, and all install oneapi toolkit, installation directory /opt/intel/oneapi
you need to install the plugin Remote-SSH in VScode,
then to settings Remote-SSH, and connect to c2
Configure the remote linux target to run the oneAPI development environment script (setvars.sh) when VS Code starts the remote connection,
Add the following code to /etc/profile
>>> vi /etc/profile
if [ -z "$SSH_TTY" ] && [ -n "$SSH_CLIENT" ]; then
. /opt/intel/oneapi/setvars.sh &> /dev/null
fi
After connecting to the remote, there should be a new window at this point that
Then search for Extension Pack for Intel(R) oneAPI Toolkits and C/C++ extension plugins in the New Window Plugin Marketplace and install
After installation, follow the prompts to configure the oneapi environment
ctrl+Shift+p, type oneapi, select Intel oneAPI: Initalize default environment variables, click Continue
The above vscode configuration for remote debugging is pretty much the same as the documentation given on the official Intel website
3.2 Re-step with eclipse
you can follow this to settings eclipse
When configured, for vscode, use the following launch.json file, and you should change the key miDebuggerServerAddress value ,like you start gdbserver's remote server. and key program value if you use my program, you do not to modify it
Now I should go start the gdbserver on c1
>>>gdbserver --multi :23456
Then click Debug to run,
Then you will be prompted with the following error message
eclipse is also the same problem,Because the problem of my OS may not support the use of gdb-oneapi in eclipse, so I temporarily use the native gdb to debug, but also agreed to report the following problems, i think gdb-oneapi also has this problem.
VScode for my project directory is roughly as follows
eclise for my project directory is roughly as follows
compiler version
I think this problem should be unlikely to be related to the version, I think maybe at present vscode and eclipse do not support the way to remote debugging with --multi start, so please help to look at this problem, thank you very much.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for providing the details.
We can see that you are using an unsupported version of the Operating System. We recommend you to try on any one of the supported Operating Systems and if you still face any issues please get back to us.
To check the supported OS, please refer to the below link:
Thanks & Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi:
I changed the OS operating system, but still have this problem
oneapi debugger: 2021.6.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>"When configured, for vscode, use the following launch.json file, and you should change the key miDebuggerServerAddress value"
In the remote machine(C2), what is the value of miDebuggerServerAddress? Is it the IP address of the local or remote machine(C1 or C2)?
>>"Now I should go start the gdbserver on c1"
Could you please share with us the URL referring to the remote debugging using gdbserver (with --multi option)?
Are you trying to launch the gdbserver on the host machine(C1)?
Are you using a mounted working directory that is common to both local & remote machines?
Could you please try launching the gdbserver on the remote machine(C2) & start debugging using the local machine(C1).
Thanks & Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
>> In the remote machine (C2), what is the value of miDebuggerServerAddress? Is it the IP address of the local machine or the remote machine (C1 or C2)?
c2 is the server I connect to remotely using vscode, c1 is the server where I start gdbserver --multi
So the value of miDebuggerServerAddress is the ip of c1 and the port you specify to start the gdbserver
Assuming c1's ip is 10.0.0.200
So the vscode launch.json miDebuggerServerAddress should look like this
>> Can you talk to us about the URL for remote debugging with gdbserver (share the --multi option)?
Here's an example, you can find the --multi in the photo
https://www.thegeekstuff.com/2014/04/gdbserver-example/
Because the most appropriate way to start debugging for my project is to use gdb -- multi, using non-multi to start debugging will not cause the above problem.
>>> Did you try to start gdbserver on the host (C1)?
Yes.
>>> Do you have to use a common mount working directory for local and remote machines?
Yes, I am using a cluster, c1 and c2 /opt/intel/oneapi are shared directories
>> You can start gdbserver on the remote machine (C2) and use the local machine (C1) to start debugging.
The problem is that if you use tools, and vscode, for your debugging and gdbserver to start with -multi, you will now run into this problem. If you don't use eclipse and vscode, and just use xshell or something in the background to connect to the server to start gdbserver and connect to debug, there is no problem.
So even if I use the tool vscode to connect remotely to c1 and then start the gdbserver --multi, launch.json file on the c2 server to configure this ip and port for c2 and run it, I still have the problem.
Here is some information I found, you can refer to
https://github.com/Microsoft/vscode-cpptools/issues/78
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please try the following in your launch.json file
Remove (or comment out) the miDebuggerServerAddress entry.
Insert a line for debugger arguments:
"miDebuggerArgs": "-ex 'target extended-remote c2:23456' -ex 'set remote exec-file ${workspaceFolder}/matmul'",
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page