Cannot get the remote debugger for Delphi 2007 to work correctly? - delphi

I followed these instructions while trying to get remote debugging working with Delphi 2007. After completing all the steps, the remote debugger is half working.
It is able to launch and halt the application but the break points I set do not work. The automatic break point (at line Application.Initialize;) is working but it goes right to the CPU window. The debugging information appears to be missing.
I triple checked, both 'Include TD32 debug info' and 'Include remote debug symbols' are checked, a clean build was performed, and the correct files have been moved to the remote machine.
What am I missing?
Any help would be greatly appreciated.

You might like to go through my own checkist for this, which is as follows. I hope its not too patronising, but there may be a step you've omitted. I also seem to recall that it was improtant to use IP addresses, not names. Also note that these instructions are for D7, howver I'm not aware that the principle has changed.
=======
In this description, TARGET refers to the machine being debugged (i.e the remote machine) and HOST refers to the machine being used fro debugging (i.e the local machine).
If necessary, install the remote debugger on the target by copying the RDEBUG folder to the target and running SETUP.
Run the remote debugger locally on the target using Start | Borland Remote Debugger | Remote debugger. A ‘spider’ icon should appear in the task bar. (It can be useful to double-click on this icon to obtain a connection status dialog – this shows how the local IDE is connecting to the remote in later steps here).
On the host machine, explode the project to be debugged. Check that this compiles locally and runs offline.
By convention, copy the SOFTWARE ROOT folder from the host to the target. This will be the working folder for the application when debugged. By copying the folder in its entirety, all support files will be found locally as needed. (This also fits nicely with using SecondCopy to duplicate the entire ART software tree on a remote machine and then to explode the required project – this will create the remote folder for you).
In the Delphi IDE on the local machine, use Run | Parameters | Remote to set the Remote Path to the remote exe file in the folder you have just copied, as it will be visible on the target machine. If you’ve copied it as instructed in ‘4’, this path will be identical to the file that the local IDE would create and debug, eg “C:\Art_Soft\RT290\Bench\Dev4all\RT290w.exe”
In the Delphi IDE on the local machine, use Run | Parameters | Remote to set Remote Host to the IP address of the target (you should use IPCONFIG on the target to find out what the IP address is). Before leaving the dialog, select ‘Debug Project On Remote Machine’.
Enable “Include remote debug symbols” on the “EXE and DLL options” pane under Project|Options|Linker
Compile and run the file from the IDE. The remote connection status should show connection progress and a the remote screen should show the application running.

What are the correct files? I assume both the .exe and .rsm file?
(disclaimer: I only know remote debugging in D2009)

Related

Error "LoadLibrary failed with error 126: The module could not be found" when launching Spyder IDE through VPN

Here's what happens:
Using a Macbook Pro, I use the Microsoft Remote Desktop Connection application to connect to my work computer, which is a Windows 10 machine
If I try to launch Spyder on my work computer, I get this error:
Load Library Error
However:
If I am at my work computer (i.e. physically at work instead of logging in remotely), I can launch Spyder successfully
If I leave Spyder open on my work computer, then go home and do a remote log-in to my work computer, I can use Spyder without issue. The problem/error described above arises only if I try to open Spyder through the remote connection.
This error only seems to affect Spyder and I can use all other programs without issue through a remote connection. As a workaround I've been using other IDEs and successfully running scripts, but I strongly prefer Spyder.
What I have tried so far (without success):
The 4 troubleshooting steps posted by Fazil M. to this Microsoft thread
Uninstalling/reinstalling Spyder using Conda
Restarting my work computer
System Information:
Work Computer OS: Windows 10, 64-bit
OS of computer through which I'm logging in to work computer: Mac OS X El Capitan 10.11.6
Spyder version: 4.1.1
Any thoughts as to what could be going on?
Update--More information and trials:
I checked out Issue #3736 on Spyder's GitHub. It says to download and add a file called opengl32sw.dll to the folder ~\Lib\site-packages\PyQt5\Qt\bin. But when I go to the PyQt5 folder, I do not see a subfolder for Qt. I tried placing it into the PyQt5 main folder, but that did not fix the problem.
I've heard this can be a graphics card issue too. On my machine I have two graphics cards: AMD RadeonT R5 430 and Intel(R) HD Graphics 630.
Darren's answer did not work for me. What did work was to:
First option: go into the device manager and disable the Intel HD Graphics card under "display adapters."
Second option:
run "Gpedit.msc"
navigate to Computer Configuration->Administrative
Templates->Windows Components->Remote Desktop Services->Remote
Desktop Session Host->Remote Session Environment
Disable "use WDDM graphics display driver for remote desktop
connections"
Restart the computer
See https://answers.microsoft.com/en-us/windows/forum/all/windows-10-1903-may-update-black-screen-with/23c8a740-0c79-4042-851e-9d98d0efb539
It took help from my organization's IT contractor, but I fixed the issue by doing the following:
Run a file called "gpedit.msc", which will open up a window for Local Group Policy Editor
In the tree menu on the left, navigate to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment, and open the Remote Session Environment folder (not the subfolder within it)
Make sure the following are set to "Enabled":
"Use hardware graphics adapters for all Remote Desktop Services"
"Prioritize H.265/AVC444 graphics mode for Remote Desktop Connections"
"Configure H.264/AVC hardware encoding for Remote Desktop Connections"
Then restart the computer.
Since I was unable to get pass LoadLibrary 126 error using the solutions provided online and on here, I stepped back and realized the obvious workaround. The errors occurs when you open the program while you're using a remote session, right? The obvious solution is to launch the program while a remote session is not in progress. To do this while you're remoting, you should create a batch script to launch the program but make sure to include to a time delay before that (I used 'timeout 10 /nobreak' to do so). Run the batch script and, before your program launchs, disconnect from RDP. After enough time passes for the program to launch, you can reconnect to RDP and your program will be up and ready

RubyMine on Windows with rails code on OS X server

This is a weird question, so bear with me while I try to explain it properly.
I have a Ruby on Rails app running on Heroku, with source code on Git. In my home, I have a Mac small laptop, and a Windows 7 Desktop PC.
What I want is to be able to work the code on RubyMine on my Windows machine. Because of many many shenanigans, working on Windows and then uploading to heroku just doesn't work.
Instead, I would like to download my code on my Mac, open it somehow from Windows (on LAN), and be able to run it on the Mac (from RubyMine on Windows), and open it in a browser from Windows.
I've been trying for several weeks now. Have anyone done this before? I know it sounds bizarre, but I really wish to work on my 3 monitors Windows setup.
You can let RubyMine use an SDK over SSH.
go to: File => Settings
select: Languages & Frameworks => Ruby SDK and gems
click the add icon (plus symbol)
choose: New remote...
select: SSH Credentials
fill in the host, username, password and path
After adding the remote SDK make sure it is selected as your project SDK.
edit
As #GujMil pointed out in the comments below, when running the application the Windows path is send as parameter to the Ruby SDK. After some fiddling I found that you can map the local path to the remote path in the SDK Configuration or Run/Debug Configurations.
go back to the SDK configuration (step 1 & 2 previous list)
click the Edit Path Mappings icon for your remote Ruby SDK (img)
add your path maps
For me the following was enough (using Linux instead of OS X):
+----------------+-------------+
| Local path | Remote path |
+----------------+-------------+
| //192.168.0.96 | /home |
+----------------+-------------+
For further info see: https://www.jetbrains.com/help/ruby/configuring-remote-interpreters-via-ssh.html
If your question sounds bizarre, so does my answer. I have experimented a similar setup with Linux servers.
Set up a shared folder to host the code on the Mac: Apple
instructions here
Access the folder over your LAN and edit the code in RubyMine.
Open an SSH terminal to your Mac so that you can remotely run the
Rails server, run necessary commands and view the logs (easy with
your multi-monitor setup)
Note: RubyMine will likely complain about missing gems.

How to deploy Powerbuilder application with ODBC connection?

my application works fine on the computer where I made it but on another
machines it displays error: "Transaction not connected".
I installed pack created by Runtime Packager and added a couple
of DLLs to the application path on the target machine. Still the same
problem.
My question is if I should use dnsless connection to make it work?
Or maybe inform the target PC about the required ODBC configuration?
If yes - how to do that?
I read a lot about odbc.ini, system variables, registry entries etc.
but now I got it all mixed up and have no clue what to do.
I'll be very grateful for your help.
Kris.
Personnally, I use DSN. So, the only thing the PowerBuilder knows is the DSN name. On that base, I establish the connection.
On the target PC, I configure ODBC with this very same DSN name and the necessary drivers. This way, you have some flexibility in the deployment. For instance, I can develop using DSN 'db', referring on my developper's machine to database 'dev' or the server 'server_dev' and deploy on a target machine where 'db' refers to 'prod' database on server 'productionServ'.
Compatibility issues aside, it can even be that the first one is MySQL and the other onee Oracle.
It is anyway crucial to install the drivers allowing you to access the desired database on the target machine and, if you use DSN, to configure it.
Since you said you got confused with odbc.ini & registry, lets start from there.
Assuming the required ODBC connection is configured in your computer (as you said),
Open registry editor (Win+R, regedit) in your computer.
Go to path "HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI". NOte: "HKEY_LOCAL_MACHINE" can be used for multi-user computers.
Right click on your "ODBC Connection" and export. Save the file(*.reg). (opening this file in notepad will give you some ideas on how it is configured.)
Also do the same for "HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\". Merge both files into one (open the *.reg files in notepad and merge the text).
Now you have the following options to setup the ODBC in your target machine(s):
This file(*.reg) can be executed on the target machine (beware, the drivers path might be different in the target machines.).
If you have an installer, try to include code to write the registry values from the installer.
Use PB function RegistrySet() to create your own ODBC connection if it does NOT exists.
Brief of what we are trying: Export registry entries (as a *.reg file) from the development machine and create similar registry entries on target machines using any of the 3 methods listed above.

Locking/Unlocking a file remotely in Subversion

I have Subversion setup on a Windows machine for iOS development. The WIndows machine acts as the server and all the team members are working on Macs.
I use TortoiseSVN as the SVN client and I know you can lock files using that but you have to have access to the directory in the server to do that all the time. Therefore I'm looking for a way to do it remotely.
To explain further, when a team member starts editing a file, he should be able to issue a command through the terminal (I read that you cannot do this through Xcode though a feature like that would have been great!) to lock the file and again unlock it the same way.
How can I do this?
Thanks
svn lock <filename> on a file kept in a working copy is the equivalent of Tortoise's "Get Lock"

Running PSEXEC so files and directories are relative to target machine

Ok, I am having trouble registering OCX files on remote machines using psexec, but think I have figured out where my problem lies.
Basically I have a script that runs the following command
PSEXEC \WORKSTATION1 REGSVR32 /S "\WORKSTATION1\C$\WINDOWS\SYSTEM32\CONTROL.OCX"
This successfully regsiters CONTROL.OCX and my application works... for administrators.
It does not work if a non administrator is logged on.
After hours of research and help on StackOverflow I have determined the reason is within the registry of the remote machine (WORKSTATION1) the location of the OCX file is stored in a string with the value of:
\WORKSTATION1\C$\WINDOWS\SYSTEM32\CONTROL.OCX
instead of:
C:\WINDOWS\SYSTEM32\CONTROL.OCX
Since normal users do not have access to the administrative share C$ they are unable to run the application that relies on the OCX.
Is there anyway to run REGSVR on the remote machine using PSEXEC and have the script treat C:\WINDOWS\SYSTEM32 as the directory on the remote machine instead of the machine I am running PSEXEC from? That way the OCX would register with the proper path name.
Thanks
psexec passes its arguments directly to the remote program.
Passing C:\WINDOWS\SYSTEM32\CONTROL.OCX should work fine.

Resources