CndNb65UserViewRemoteDevelopment2

Definition

Remote development should allow user to develop an application which would be built, run and debugged on another workstation directly from the NB IDE.

Basic Use Cases

  1. Very common setup: user has a Windows laptop but wants to write Solaris or Linux applications
  2. User wants to build, run, and debug his application on different systems

Assumptions

  • The sources are stored in a location which is accessible from all servers and the laptop (client)
  • Differentiation in file names on client and server will be resolved by a special path mapping engine
  • Remote system headers required for code model are copied from server and stored on client
  • SSH2 protocol is used to run remote commands

Requirements

  • On server: sshd server, tool chain (GNU or Sun Studio)
  • On client: Java and NetBeans C/C++

Sample Workflows

Use case 1: Joe wants to set up a remote development server on serv1

  1. Joe pressed the Services tab and selects The C/C++ Remote Development Servers node.
  2. He right-clicks the node and selects Add New Server...
  3. A window is displayed and Joe enters serv1 as the remote server, joe as the login (joe is his login on serv1) and presses OK
  4. An Enter Password window is displayed and Joe types in his serv1 password and presses the Return key

The serv1 node is shown as a child of the C/C++ Remote Development Servers node. Its initial state is Initializing but soon changes to Alive.

Use case 2: Joe wants to create a sample C/C++ app (Args), but he wants it to build, run, and debug on serv1

  1. Joe selects Args in the Choose Project panel of the New Project wizard and goes through the normal steps to create a C/C++ sample program. The only non-standard thing he does is specify Z:/projects as the project location (Z:/projects is an NFS mount of serv1:/work/joe/projects and is already mounted on his laptop)
  2. Joe right-clicks on the new project and selects Project Properties from the context menu
  3. He selects the Build node and sets the Development Server to serv1
  4. The Tool Collection list changes (the tool collections on Joe's laptop disappear and are replaced by the ones found on serv1). Joe selects the Sun Studio 12 entry and presses OK (assume SS12 is installed on serv1 and in Joe's login path on serv1)
  5. Once the Project Properties panel closes, Joe selects Build->Build Main Project and watches the project get built on serv1

Use case 3: Joe wants to change from Sun Studio 12 to the GNU compiler tool collection:

  1. Joe opens the Project Properties for Args_1 and selects the Build category
  2. Joe clicks the Tool Collection property, selects GNU and presses OK

Use case 4: Joe wants to build his Args sample on serv2:

  1. Joe follows the same steps as in use case 1, except he types serv2 instead.
  2. He brings up the Project Properties panel and changes the Development Server to serv2 before pressing OK
  3. When he pressed the Build Main Project icon the Path Mapping window pops up and tells him it can't map serv1:/work/joe/projects/Args to a path on serv2
  4. Joe knows the correct path and types in /net/serv1/export/work/joe/projects/Args and presses OK

The project resumes building and builds correctly.

Note: We plan on exploring how we can automate this last path conversion. If we find out how to do this, then the 3rd and 4th steps will no longer be necessary.

Use case 5: Joe wants to run his Args program:

  1. Joe presses the Run Main Project icon and his Args program runs as expected

Use case 6: Joe wants to set a breakpoint and debug Args on serv1:

  1. Joe brings up the Project Properties and changes the Development Server to serv1 before pressing OK
  2. Joe selects Run->New Breakpoint..., sets a Function breakpoint in main, and presses the Debug Main Project icon

The Args program starts gdb and stops with the program counter on the 1st line after main. Since args.c isn't already displayed, the IDE opens it.

Note: The Args program was built on serv2 with paths starting with /net/serv1/export/work, so the IDE had to convert the path to the serv1 version. When it stopped at the breakpoint and requested the IDE to open args.c, it had to convert the path to Z:/projects/Args (the path on his laptop).

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo