Search code examples
linuxeclipseunixremote-debugging

Develop on Windows and running on linux machines


I need to develop applications for Linux but I don't want to either program on Linux (I already have all my "precious" tools setted up) or test it on Windows using some kind of POSIX for Windows and hoping that if runs well on that runs well on real Linux.

What's the better choice? Preferentially I want to use Eclipse IDE for compile/run/debug and run my programs on a Linux distribution that is running on a local VM or remote.

Right now I'm using a similar approach, but for Java Web Service testing on a remote server. Perhaps that's the way to go?

Edit:

In order to beter explain what I want, here is the steps that I want to follow:

  1. Program in C, for POSIX compliant systems, using Eclipse on Windows
  2. Make small tests on Windows, perhaps using Cygwin (this is not mandatory it's just to be quicker)
  3. From my Windows Eclipse, I want to run/debug my application on a real Linux environment (could be a VM or a remote machine) and, preferentially, redirect the application stdout to my computer. The Linux machine only exists in order to garantee that everything runs ok, no need of even open it.

One thing that I didn't mentioned: all of the applications are command line, no need for GUI, just input from a shell and read the output.


Solution

  • First, install Linux in a virtual PC like VirtualBox or VirtualPC or something from vmware.

    Then configure Eclipse for remote development. That allows you to run tools (like the debugger, the compiler suite, etc) on Linux from your Windows desktop inside of Eclipse. You edit the files just like you're used to, you debug as if the app was running local on Windows, etc. Eclipse will do the plumbing.