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 208658

Summary: Unable to specify remote directory to run for Debugger
Product: cnd Reporter: grob115
Component: RemoteAssignee: Andrew Krasny <akrasny>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 7.0.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description grob115 2012-02-20 16:39:51 UTC
It appears that the Project Propertes -> Run -> Run 
Directory setting isn't working correctly.  Observed the following:
1) Run -> Run works fine if it's instructed to start a bash script to load environment variables and execute the binary.  Yet Debug -> Debug Project would fail for the same script.
2) The Project Propertes -> Run -> Run Directory setting isn't working correctly as expected.  If specified, Netbeans would treat /home/<username> as its default directory.  My code is setup to read config files and write log files and it'd attempt to do it at /home/<username>.  If removed this setting, it'd treat the directory at which it finds the source files to do remote build to be the default directory.  In my case, I have setup to have System Level File Sharing and set up Path Mapper.  Binary started by Netbeans this way will find the config files and writes the log files from and to this location.


http://netbeans.org/projects/cnd/lists/users/archive/2012-02/message/51
Comment 1 soldatov 2012-02-21 12:01:55 UTC
for me run and debug works nicely if your doesn't use getenv("PWD").
what returns "echo `pwd`" command in shell script or getcwd() in C/C++?
Comment 2 grob115 2012-02-21 15:47:21 UTC
Thx but I'm not using "pwd".  I simply run a export LD_LIBRARY_PATH, followed by a "exec ./<binary>".

Any idea what the Project Propertes -> Run -> Run Directory setting is for?
Comment 3 Egor Ushakov 2012-03-30 15:51:51 UTC
looks like debugger issue
Comment 4 Egor Ushakov 2012-04-03 09:23:48 UTC
remote issue as well,
steps to reproduce:
- create any sample project 
- setup remote configuration
- set run directory (e.g. /tmp)
- run
I get an error:
Unable to start pty process: /bin/sh: /export/home/ABC/.netbeans/remote/XYZ/DEF-SunOS-x86_64/tmp: does not exist
Comment 5 Andrew Krasny 2012-04-06 10:51:53 UTC
Well, we still don't have a good solution for this.
We decided to use /// - notation for paths that should not be translated to remote paths

So now you can specify Run Directory property as ///<absolute-path-on-remote-machine> to prevent paths conversions..

Changeset: http://hg.netbeans.org/cnd-main/rev/7ae599db3f21