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 252827 - Remote Attach doesn't work
Summary: Remote Attach doesn't work
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: henk89
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-05 09:44 UTC by soldatov
Modified: 2015-07-13 12:51 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 soldatov 2015-06-05 09:44:46 UTC
Scenario:
- Add remote host (Solaris, GNU is default toolchain, SFTP is remote mode)
- Create Quote project (/export/files/NB is local project location)
- Press Run Project button on toolbar
- Push Debug|Attach Debugger... menu item
- Select remote host, select quote_1 process and press OK
==> "Debugger Error" window appears
/export/files/NB/Quote_1/dist/Debug/GNU-Solaris-x86/quote_1: No such file or directory.

automatic test fails ~2 months
Comment 1 Vladimir Kvashin 2015-06-15 18:23:15 UTC
It's probably a regression caused by 
http://hg.netbeans.org/cnd-main/rev/6ec8ff163ad7
and possibly
http://hg.netbeans.org/cnd-main/rev/a459d48725b5
Still investigating...
Comment 2 Vladimir Kvashin 2015-06-16 09:25:05 UTC
This takes place when user selects Quote project in "Project" field in the below part of the dialogue. If "no project" is selected, everything works OK.
Comment 3 Vladimir Kvashin 2015-06-16 09:25:35 UTC
This takes place when user selects Quote project in "Project" field in the below part of the dialogue. If "no project" is selected, everything works OK.
Comment 4 Vladimir Kvashin 2015-06-16 10:47:20 UTC
The below is just a write-down of my investigations. 

The changesets 6ec8ff163ad7 and a459d48725b5 don't look correct. I see two issues with them:

1) They introduce this regression (basically 6ec8ff163ad7; the is just an additional fix for the former one)

2) The behaviour differs for managed and unmanaged projects. 

Prior than conrtol gets to the point of these changes, 
The DebugTarget.setExecutable is called several times, and the path to executable (the one that is displayed in attach dialogue) is passed to it. It in turn calls configuration.getMakefileConfiguration().		getOutput().setValue(exec).

But after changes in NativeDebuggerManager.attach introduced with 6ec8ff163ad7 we do:
symbolFile = ((MakeConfiguration) conf).expandMacros(symbolFile);

In the case of unmanaged project, we get the same path we previously set in DebugTarget.setExecutable. (On another hand, why do we need this code then?). 

But in case of managed projects it behaves differently. MakeConfiguration.expandMacros calls MakeConfiguration.getOutputValue() and its code, for unmanaged projects, returns the same value we set previously, but for unmanaged projects - a different one.
Comment 5 Vladimir Kvashin 2015-06-16 10:53:17 UTC
I've just pushed a partial fix:
hg.netbeans.org/cnd-main/rev/d4294f76dacc

I'm quite sure it's correct, since it concerns only the "if" branch that deals with non-absolute paths (which is the case in most situations); and non-absolute path to build result returned by project should be mapped to remote.

I'm not sure I know a comprehensive fix for the above mentioned issues, so I just downgrade this to P3 and reassign do debugger.
Comment 6 Quality Engineering 2015-06-17 02:37:31 UTC
Integrated into 'main-silver', will be available in build *201506170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d4294f76dacc
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: partial fix for #252827 - Remote Attach doesn't work