- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I'm using vscode to remotely compile and debug the example project array-transform code and I'm getting errors, if I don't compile it through vscode, I can compile it myself in the background and then debug it without problems. Now I want to compile it automatically before debug.
Now I have created a .vscode directory in the current directory, under which I have created both launch.json and tasks.json files. When I run it, I see that the reason for the error is that the associated static file or something is not found... But I did load oneapi's setvars.sh environment .... Also I'm curious why I have this problem of missing static files in vscode when I compile directly with cmake in the background with no problem...
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
>>I'm using vscode to remotely compile and debug
Could you please elaborate on the above statement?
Could you please provide the steps you have followed so that we can try it from our end?
Also please provide the OS details(both remote and local machine) and compiler version being used
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We haven't heard back from you. Could you please provide an update on your issue along with the above-requested details?
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi:
Sorry, I've been busy these days and forgot to reply.
This problem is solved for now, still a bit confused. You can find the steps you need to follow on the website.
General question.
I wanted it to compile automatically before debugging, so I added the tasks.json and launch.json files.
launch.json is debugged with gdb-oneapi, plus a hook preLaunchTask, so I wrote tasks.json.
The problem is the tasks.json file.
When I write `"command": "mkdir build && cd build && cmake . . && make"`, I get an error when I run the debug.
If I first run it in the background via xshell.
>>> source /opt/intel/oneapi/setvars.sh
>>> mkdir build && cd build && cmake ..
Then the tasks.json file writes `"command": "cd build && make"` and runs the debug and it has no problems.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi:
local: win10
remote: centos8.2
tools: vscode (remote ssh linux)
inteloneapi compiler version: 2022.0.2
inteloneapi debugger version: 2021.5.0
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for providing the details.
We are working on your issue and we will get back to you soon.
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For using VS Code remotely with oneAPI it is essential that the oneAPI environment is loaded also for non-interactive shells, see https://www.intel.com/content/www/us/en/develop/documentation/using-vs-code-with-intel-oneapi/top/ssh-development-top/ssh-development.html#developing-a-visual-studio-code-project-for-ssh-development_set-oneapi-environment-variables-on-the-remote-host
You may check this outside of VS code by executing "which icx". You should see the icx path below (this shows the latest version):
> ssh my_remote_system which icx
/opt/intel/oneapi/compiler/2022.1.0/linux/bin/icx
If this does not work, please add the following to your $HOME/.bashrc script (see link above):
[ "$BASH_DATE" ] || BASH_DATE=$(date +%y%m%d.%H%M%S)
if [ -z "$SSH_TTY" ] && [ -n "$SSH_CLIENT" ]; then
. /opt/intel/oneapi/setvars.sh --force > $HOME/log_setvars_$(hostname -s)_${BASH_DATE}.txt
which dpcpp >> $HOME/log_setvars_$(hostname -s)_${BASH_DATE}.txt
fi
Using $HOME/log_setvars_$(hostname -s)_${BASH_DATE}.txt is my trick to check the execution. Alternatively you might want to redirect the output to /dev/null as shown at the link above.
Please find attached the JSON files I used with minor modifications. For example, my version of VS Code reported that '"comments":' is not supported. I replaced it by "//"

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page