This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 271452 - wrong executable path when launching remote debug
Summary: wrong executable path when launching remote debug
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-08 17:04 UTC by germano2239
Modified: 2017-09-12 20:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description germano2239 2017-09-08 17:04:27 UTC
Overview:

Trying to build and debug a c++ application on a remote Raspberry device over SSH, with the condition that the executable should be placed and run in a specific directory (e.g. /var/my_folder/my_executable).

Steps to reproduce:

-create a new c++ project and build on a remote host via SSH
-change Properties->build->Linker->Output to a fixed name
-configure accordingly the Properties->Run->Run command and Properties->Debug->Debug command parameters

you will notice that the run mode will work, but the Debug will always give the error:

/some_user/.netbeans/remote/some_ip/some_hostname-x86_64/C/Users/some_user/Documents/NetBeansProjects/my_executable does not exist or is not an executable.

in other words, the debug path does not seem to be correctly generated, it always prepends the "automatic copying" path no matter what you do. 

In debug mode, Properties->Debug->Debug command seems to be completely ignored, and the run command is used instead, forcefully prepending the auto copy path, which is not done by the run mode.
 
Properties->Debug->Working Dir seems also to be completely ignored.
Comment 1 soldatov 2017-09-08 19:59:05 UTC
confirmed.

Workaround: use "Full Remote" mode (https://netbeans.org/kb/docs/cnd/remote-modes.html#gmvfz)
Comment 2 Vladimir Voskresensky 2017-09-09 09:11:58 UTC
Possible workaround:
use "///" prefix for paths if you'd like to suppress path conversions, i.e.

///var/my_folder/my_executable
Comment 3 germano2239 2017-09-12 08:43:02 UTC
(In reply to soldatov from comment #1)
> confirmed.
> 
> Workaround: use "Full Remote" mode
> (https://netbeans.org/kb/docs/cnd/remote-modes.html#gmvfz)

Tested, works fine both in run and debug; there seems to be a problem with remote git in this mode, everything works fine but for some reason I can't push the initial commit to a remote repo (gitlab). in the "push to remote repository" wizard I get the error "Cannot connect to the remote repository at https://[my _repo]" although if I do the push from a remote terminal it goes trough fine.

Thanks
Comment 4 germano2239 2017-09-12 08:45:29 UTC
(In reply to Vladimir Voskresensky from comment #2)
> Possible workaround:
> use "///" prefix for paths if you'd like to suppress path conversions, i.e.
> 
> ///var/my_folder/my_executable

I've tried this solution but it doesn't seem to work, the three slashes do not seem to have any different effect than using just two.

Thanks
Comment 5 soldatov 2017-09-12 19:51:09 UTC
(In reply to germano2239 from comment #3)
> (In reply to soldatov from comment #1)
> > confirmed.
> > 
> > Workaround: use "Full Remote" mode
> > (https://netbeans.org/kb/docs/cnd/remote-modes.html#gmvfz)
> 
> Tested, works fine both in run and debug; there seems to be a problem with
> remote git in this mode, everything works fine but for some reason I can't
> push the initial commit to a remote repo (gitlab). in the "push to remote
> repository" wizard I get the error "Cannot connect to the remote repository
> at https://[my _repo]" although if I do the push from a remote terminal it
> goes trough fine.
> 
> Thanks
Also you can create empty "Full Remote" project and set "Build|Linker|Output = /tmp/abc".
First project can be used in order to modify code, second project can be used in order to debug project.

Risks: you will see 2 absolutely independent files (A.cpp on local machine and A.cpp on remote machine). Files has same title and content, but different tooltips.
Comment 6 soldatov 2017-09-12 20:06:27 UTC
I created issue 271465 too