Connecting the PyDev debugger to a remote computer running a different OS - debugging

We develop software, which constantly needs to be debugged on both Linux and Windows. The way I would like to do this is to have an option in Eclipse (PyDev) saying "Debug this application on the remote Linux server". I then want the option to execute the code line-by-line.
Does such a feature exist in Eclipse? If it does not exist in Eclipse, what is the recommended approach to do such a thing? I have thought about installing Eclipse also on the Linux server, but then I have the extra work of configuring and maintaining several eclipse setups.

Have you read: http://pydev.org/manual_adv_remote_debugger.html ?
One thing you cannot escape from right now is having the sources for the debugger in the platform you want to run... (although you don't need eclipse itself there, at least you need the contents of org.python.pydev.debug/pysrc there, so, maybe you can create your script which will copy those from a 'central' location you keep updated, or if you have a shared folder, just add that network folder to your pythonpath).

Related

Goland remote development setup

Im developing my first go project and i need to develop it on a remote linux server. Its something small and this is why i need something really simple, but 3rd day now im trying to setup my goland with no success. Starting to wonder if i need it at all here.
I already setup my SSH terminal and my SFTP. The problem is that im not sure how to write my code locally, build it locally and upload to the server or build it on the server. This is what i tried:
Tried to develop with remote file manager and remote terminal, just using goland as editor. The problem here is that if goland meets some missing package, it will give me errors, maybe here i can somehow ignore this?
Tried to write it locally, sync with remote on every save and compile it from the terminal, but this will create an issie with missing packages, but in general it works.
Tried to write it locally, compile it remotely from the Run options. The problem here is that i want to write my install.go file locally and upload it to /root/project/install as compiled file, but its creating some temporary files, tried even to overwrite my -o file from the "Go tool arguments", but it just adds the path to the existent one.
Tried to write it locally and compile it locally and then upload it to the server, but cant find the way for such thing at all.
Maybe dlv, but it looks like a simple issue, hope i wont have to install additional software on the server because of this.
Is some of those options valid or im missing another options? I hope you understood what i really want.
Thank you in advance!
but 3rd day now im trying to setup my goland with no success. Starting to wonder if i need it at all here
You don't need it.
Tried to write it locally and compile it locally and then upload it to the server, but cant find the way for such thing at all.
This is what you want. The only thing you need to install on your server is the executable from go build, built for the server's architecture, which you can copy over SFTP.
When you want to run your program locally, you will use go build to produce an executable that you can run.
When you build for the remote server, you will want to set GOOS and GOARCH to the values appropriate for your server:
GOOS=linux GOARCH=amd64 go build -o my-project.linux-amd64
If your server is ARM, substitute arm64 for amd64.
Then copy my-project.linux-amd64 to the server and it will be able to successfully run there.
Im developing my first go project
Then make sure to understand this point: go executables don't need go libraries at runtime.
This is a big selling point for Go, and is different from an interpreted language like Python, Javascript, Ruby, and also different from languages that run in a software virtual machine like JVM (Java) or BEAM (Erlang) baed VMs.
As a newcomer to go, please make sure to read the tutorial.
Save yourself a lot of hassle and Write tests right away as you develop your first project. These should be your primary way of demonstrating functionality as you work on your project.

Btrieve 6.15 (Win 95) does not autoload in VB 6.0 IDE environment

I've recently bought a new tower and used third-party software to port across all my development tools (another story in itself), including VB 6.0, all my third-party tools, and Btrieve. The only problem I have with Btrieve is more an annoyance than anything. On this new tower, I have to remember to run my compiled application once before attempting to run it from inside the IDE or else it will not load, and subsequently return a corresponding error when it attempts to open the first file.
If anyone else has encountered this and knows how to fix it, I'd much appreciate it.
After checking this page on Wikipedia I realized that I needed to focus on two files: w32mkde.exe and wbtrv32.dll
By manually running the exe file, it would load the engine and my application would then run in the IDE, but I still had to manually start the exe. The desired and original behavior on my older machine was that running my program in the IDE would automatically launch the sever exe. From the Wiki page, I learned that it was wbtrv32.dll that was actually called by the program, which in turn would call the exe if needed.
I had recentl ported over my old machine to a new tower, and many of the ocx and dll files in \windows\syswow64 did not make it. There seems to be no pattern to which ones, but I had to re-register those as I found them. There must be some link there, because when I copied-over the W*.exe and W*.dll files from my production backup folder to the syswow64 folder, it suddenly worked again. Likely just a corrupt copy of the dll file. I believe the reason that the compiled version ran correctly is because those dll and exe files were installed to the application folder, and were apparently okay, but not being invoked when run from the IDE.
Hope this might help someone else some day.

Eloquera with ASP.NET MVC. Error

I am curious about using an object db so thought i'd give Eloquera a go.
I am having problems getting it running unfortunately. (running in "desktop mode")
I have done these steps as directed:
1) Copy the following assemblies and a configuration file from the %ProgramFiles%\Eloquera folder into a project folder:
Eloquera.config
Eloquera.Client.dll
Eloquera.Common.dll
Eloquera.Server.exe
You can copy the reference files into a separate folder for your convenience.
2) Uninstall the Eloquera DB (sounds awful, but we have copies all files we will need) - (I never installed it)
3) Add Eloquera.config into your project via “Add an existing item…”, and set its "Copy to Output Directory" property to "Copy Always". Done
4) Add the project references to these files:
Eloquera.Client.dll yep
Eloquera.Server.exe yep
5) Rebuild your project and check that Debug\ and/or Release\ folders contain the following files along with your application:
Eloquera.config
Eloquera.Client.dll
Eloquera.Common.dll
Eloquera.Server.exe
It does
6) You may change a physical path to the database files in the Eloquera.config file by setting DatabasePath value:
DatabasePath="c:\dev\db" I did this also
The error i get is this:
The connection to the server (local) on the port 43962 cannot be established.
The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
Weirdly, changing ServerPort to something else in the config does not change this error.
Any ideas?
I think this mode is not supported.
You are meant to use Client / Server mode, which is a shame cause i was hoping i could use this desktop method to deploy into a shared host.
No dice.
You can download from Eloquera website desktop project that is already configured and working and can be used as a base.
Kohan,
Desktop mode is supported in Eloquera, otherwise my application would not work. :-) There is a good start-up project for the desktop application on the Eloquera web site, have a look at that.
I get this issue with VS2010 and 64 bit Windows 7 - if you are using the 32 bit dlls (as we are as our app needs to work on 32/64) then make sure your target build (in VS) is set to 32 bit rather than AnyCPU.
I still cannot get the Database browser working but the code is working now.
Also - obvious things like make sure your firewall is turned off etc. make sure you can telnet onto the port

Editing remote files over SSH, using TextMate?

I LOVE using TextMate on my MacBook. It's great.
Unfortunately, I want to edit some files directly on my dev server, since it's difficult to recreate the environment locally. I'm using Git, so one alternative is to just edit locally, git commit, git push, and then git merge, but that's kind of complicated every time I want to make a simple change.
I'd rather just ... use another solution. One thing I tried is mounting a hard drive via MacFusion, and then loading that in an editor. But that's so freaking laggy/slow!
Has anyone cooked up a better solution?
OK - here is the one that works on Mountain Lion.
Go to http://osxfuse.github.com/
Install FUSE for OS X
Install SSHFS for OS X
Then the following commands on your terminal:
mkdir /Volumes/SSHFS
/usr/local/bin/sshfs username#host:/path/to/dir /Volumes/SSHFS
Done.
I would also recommend using the ReMate plugin as pointed out by another user to prevent TextMate from beach-balling every time you refocus it. Link:
ReMate http://ciaranwal.sh/remate
I use Fetch and TextMate for just such tasks. Fetch can be set to use TextMate as an external editor and can even automatically open files in TextMate by double clicking.
Saving the window in TextMate automatically pushes the file back to the server. Of course you would have to commit the changes on the server at a later time.
I'm sure most Mac FTP clients could do the same.
The best thing would be using TextMate's rmate script, follow the link and you'll find the instructions bellow, I recommend it since it will make your life easier and handle all the Nitty-Gritty.
I use the free version of TextWrangler for just this and it works great. I can load and save files over sftp.
The correct answer is to use sshfs and make sure "Perform atomic saves" is checked in the Textmate preferences window. The easiest way to setup sshfs is to use Macfusion. http://macfusionapp.org/.
Try one of these methods.
see: http://wiki.macromates.com/Main/FAQ#projects
also have a look at:
http://www.gnu.org/software/tramp/
You don't need to push every time you make simple changes; git is a distributed version control system, you commit to your local repository for the small changes. You should only push to the remote repository once you finished working on a feature/bug (or for really huge feature, a complete subfeature). Well, that's assuming you can recreate the environment; which apparently you can't.
A decent text editor can have integration with your favorite control version system; if you cannot configure your editor to commit and push from inside your editor, get a decent editor.
An even better editor can be set to save, commit, push, compile, and run your program all in one click or keypress.
If you are not able — for whatever reason — to replicate your environment locally and still want to use TextMate, the FTP client+TextMate combo is the best solution I can think of. MacFusion and all the other similar solutions are neat on the paper but awfully slow.
If you feel adventurous and confident enough to drop the TextMate requirement, SSH+Vim in the terminal works amazingly well.
Are you positive you can't replicate at all your remote environment?
I know this question already has several answers, and it's been a while, but I wanted to also point out DokanSSHFS - This will use SSH to make a local drive of the directory location on the server that you choose. Then you can use your editor of choice to edit the files as if they were on a local disk.
Most of the proposed solutions are centered around sshfs in one form or another. I have tried these solutions, but I found that reliability of filesystem is not always as good as desired.
There is tool called rmate, which allows editing of remote files in text mate.
Use command from ssh session to edit file on the server:
rmate file_name
The readme on github provides easy to follow instructions on how to set it up.
MacFusion is pretty sweet for free - basically ssh-mounting of directories.
http://macfusionapp.org/
Transmit 4 has a similar feature, tho it costs $$.
Try http://ciaranwal.sh/remate/ if it seems slow, as that will disable textmate from refreshing the file list so often.
Use Fuse for OS X http://osxfuse.github.com and the companion package, SSHFS (same URL) and install them. I installed the MacFUSE compatibility libraries from there too, just for good measure.
Then, install http://macfusionapp.org and follow the instructions located here ( https://github.com/osxfuse/osxfuse/wiki/SSHFS ) to configure macfusion to use the newer libraries.
I had trouble getting authenticated with password, so I set up ssh key authentication and used macfusion without password. Works like a charm.
If you do use an IDE, you could just set up an SSH tunnel to your dev server and edit your files from the comfort of your favourite IDE. Saving the files locally would automatically then push the files on the dev server as well
P.S: I am NOT endorsing the use of IDE
You need rmate it works fine to edit files on your server via ssh using TextMate on you local machine.
Github link here
rmate might be another choice. On server side, you type rmate /path/to/file. The file will be transferred to local machine, where you use some editor like Sublime Text or VS Code (TexMate may also work). To use it, one needs to install both server and client.
For server side, there are several ones in various languages. Choose one you like. Here is the Github repo.
On local machine, as far as I know, VS Code and Sublime Text have their extensions to receive files. For VS Code, refer to here. For Sublime Text, refer to here.
On the other hand, Microsoft just announced an official remote editing extension for VS Code (not released yet).
For those remote machines not having ruby or if bash not compiled with /dev/tcp, but has python, this works: https://github.com/scriptmaster/rmate-python
If you have pip:
pip install rmate
or simply:
wget https://raw.githubusercontent.com/scriptmaster/rmate-python/master/bin/rmate
chmod +x ./rmate
mv ./rmate /usr/local/bin/rmate
then rmate /path/to/file
especially if you are in a containerd-os with restrictions (with only python and docker) such as kubernetes-vm or gce-vm
you don't need vs-code-server, atom-editor,

What folder should I install Eclipse to on Windows?

I'm running Windows 7 with UAC enabled. I've always found it weird that Eclipse doesn't use an installer and doesn't use the AppData folder to store its data in Windows, but lately I've had to reinstall it a couple times (hard drive problems) and I've been wondering if I am really putting it in the best place.
I copy the eclipse folder to my C:\Program Files\ directory and make a shortcut on my start menu, and then pin it to my taskbar. However, eclipse has problems so I go to properties, the compatibility tab, and enable "Run as administrator". Then every time I open eclipse I have to hit yes on the UAC window, but everything works correctly, except for one side effect: my touchpad doesn't scroll any windows in eclipse. This is because the touchpad program is running as a normal user, so it can't modify eclipse running as administrator. So, then I have to close and reopen my touchpad software as an administrator.
Anyway, long story short... Where is the best place to put the eclipse folder in Windows, and why?
Edit: I just found a possible suggestion, feel free to comment. Sounds like I can just run it as administrator once the first time and set up all my plugins and such, and then run it as a normal user for my normal tasks (coding). I can't believe I never thought of doing this, but I may stick to the Program Files directory and give this approach a try unless I get a better answer here.
Ninite places Eclipse in C:\eclipse. Ever since asking this question, that has been my install location for Eclipse. Eclipse still does not properly handle permissions when run out of the Program Files folder.
I setup Eclipse in
c:\software\eclipse_{version}\
I keep all my open source packages (ANT, Maven, Apache, etc) in c:\software as well. Then I add the necessary directories to my $PATH variable (c:\software\ant\bin).
I also keep the Eclipse workspace under c:\software\eclipse_workspace.
The big plus behind this setup is portability. I can simply move the entire folder to a new drive, re-setup my path, and boom everything works. No interference from registry settings at all. Makes it very easy to backup.
This approached worked for XP, Windows7 RC1 and Windows7 Professional without issue.
You can install (unzip) an eclipse:
anywhere you want (meaning you don't have to install it on c:\Program Files (I install it for instance on c:\prog\java\eclipse, a directory tree I create
with a workspace set anywhere you want (for me: c:\prog\java\workspace, and I reference that workspace in my eclipse.ini.
This is important because the default location of a workspace (using user.home) is not always a good idea (see this SO question and its associated eclipse bug which will be solved only with the upcoming eclipse Helios 3.6)
with plugins set anywhere you want through a Dropins folder (also referenced in the eclipse.ini, for me: c:\prog\java\myplugins)
with a JVM installed anywhere you want (also referenced in the eclipse.ini, for me: c:\prog\java\jdks\jdk6u18, and I have installed several others jdks in c:\prog\java\jdks)
Eclipse shouldn't ever have to be in c:\Program Files, and the setting describe above works perfectly with:
Vista or Seven, UAC fully activated
XP, with no Administrator rights.
I usually install Eclipse to %LocalAppData%.
C:\Users\<username>\AppData\Local\Eclipse\<version>\
Common install path used by Google Chrome, Python, GitHub Desktop, Discord, and f.lux
Only installs Eclipse for the current user profile. (separate per-user settings)
Does not require administrator privileges
Accessible as a default Windows environment variable (%LocalAppData%)
Folder is designated specifically to hold application data
You could put it under your User folder or My Documents folder, so you don't have to worry about permissions. Then just add a link to your start menu / quick start / desktop and you will be good to go.
I have many different versions of Eclipse and related products installed. So I have them installed as C:\Eclipse\... for Windows and /Eclipse/... under Mac and Linux. Usually with the directory name as the base name of the zip - e.g. eclipse-rcp-helios-SR2-macosx-cocoa-x86_64... Some products, like those from IBM, have their own ideas and can often not be changed...
As for the workspaces - yes, I have one for each customer - they are placed under /Eclipse/Workspaces/... and friends.
And the target platforms are placed under /Eclipse/TargetPlatforms/... and friends.

Resources