Delphi not restoring IDE properly after debug session - delphi-2010

When I click on the Run button in the Delphi 2010 IDE, my IDE is minimised and the debug desktop is shown, as expected.
However, when I terminate the debug session the desktop does not get restored to the original. Although all the correct files are there the size and position of the IDE is not restored properly. I have 'Editor files' and 'Project desktop' checked in Tools-Options-Environment Options, together with 'Minimize on run. I have tried several variations of these with no success.

Related

Delphi Executable starts in debug mode

Whenever a Executable is opened, the delphi IDE opens as like debug mode. what settings has changed in my IDE?
Can any one help me!
Update: 1. Build taken in other machine also causing this issue.
How come a opening an EXE, starts the IDE?
Default debugger was modified from vcjitdebugger to delphi debugger. So in case of exception delphi instance was started. It can me modified as below:
You need to delete the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
On a 64 bit system delete this key also:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
At the top of your IDE, you have a combo box with the available layouts of the IDE.
You probably have ‘Debug layout’ selected instead of ‘Default layout’ or so...
When you have opened a project, select 'Default layout' and then it will persist that choice for the next time you open a project.

Delphi 10.2 IDE cannot see system processes from "Attach to Process" when debugging.- Yes I am "Running as administrator"

I have been using Delphi to write and debug Service Applications for years. I am aware that I must start Delphi with "Run as Administrator" to "Attach to" and debug Service Apps. Until recently this has always worked.
Recently Delphi has stopped listing “System Processes” in the “Running processes” list. This circumstance is true for all installed versions of Delphi (10.2, XE8 & D2007). I am able to see system process from Visual Studio.
My Services are all 32bit Apps – though I don’t thing it matters, as I cannot see any system processes.
Another potential clue is that Delphi only sees 32bit Apps running in the current (desktop) session, regardless of Target Platform settings in the project.
I suspect that something may have changed in my OS (Windows 10 Pro Version 10.0.17134 Build 17134 ) or Security Settings or something… I have tried disabling Virus SW (Webroot SecureAnywhere) nothing seems to make any difference.
While this is not a total solution it does serve as a work-around:
It appears that the “Attach to process” dialog will not show System processes until I actually attach to something. This behavior has been repeatable.
Start the Delphi IDE with “Run as administrator”. Choose “Attach to Process” from the “Run” menu. I notice that only the current Session Processes are visible.
I “Attach” to any item on the list, it does not matter which one. Then I choose “Detach from Program” from the “Run” menu.
Next, I choose “Attach to Process” again and now all of the processes, including System Processes, are visible.
Another interesting note, is that Checking or Unchecking the “Show system processes” makes no difference before or after the initial “Attach”.
System Processes will now be visible anytime I choose “Attach to Process” from the “Run” Menu as long as the IDE is running. If I close and restart the IDE with the “Run as administrator” option, the System Processes are hidden until I attach/detach again.

How to change Delphi XE2 default behaviour for some panes?

After switching from Delphi2007 to XE2, I'm terribly unhappy with the behaviour of some Windows/Panes.
I'm designing in the 'Default layout', it changes to the 'Debug layout' when running/debugging.
'Autosave project desktop' is set in my environment options.
For 'Default layout':
How can I permanently hide the structure view(pane)?
Closing or un-pinning it does not hold between sessions.
How can I keep an opened group in the Tool Palette open between sessions?
All groups are closed again when I start a new IDE session.
For 'Debug layout':
A. How can I permanently hide the call stack view(pane)?
Closing or un-pinning it does not hold between sessions.
I have read How to set default compiler options for XE2? but that is about project options, not IDE configuration.
Thanks,
Jan
Like TLama already quoted you need to save your desktop layout. This was already possibly in your Delphi 2007 IDE.
Arrange the panels the way you want to, respectively hide/pin/unpin/... them. Then click "save your current desktop" in the Desktop panel.
Same goes for debugging. Layout your debug desktop while debugging and save it. But you have to make it your default debug desktop. Goto Menu > View > Desktops > Set Debug Desktop.
I don't know if you are able to keep opened groups in the tool palette.
I tried View > Desktops > Set Debug Desktop but it didn't seem to work correctly, instead what worked is View > Desktps > Save Desktop and then select the option Debug Layout in the window that appears and click OK.

Delphi 2007 IDE layout modified after a crash

I loaded a bad PAS/DFM file (long story), which caused a GPF, after which the IDE crashed horribly. Lost my Project-related data (list of open files, etc).
Now, when I start the IDE, it always is in "run" mode. that is, it shows the breakpoints and watches and local variables, even though no program is running. Similarly, the properties are not visible unless I use F11 to bring them up. I've restarted the IDE repeatedly. Interestingly, it still can compile and run a program.
How do I reset the IDE so that it works properly?
Check your layout. It's a combo box on the toolbar. It's probably set to 'Debug Layout' instead of Default or Classic (or something else if you've setup a custom layout.)

Delphi 2010 remote debugging - unable to get breakpoints working

I recently posted this question about my inability to get Delphi 2010 working with remote debugging. I have not had any success and decided to post up a simple step-by-step test technique that might highlight what I'm doing wrong. THIS IS REALLY IMPORTANT to me - I've used Delphi since V1.0 and earn my living from it. Being stuck like this is a pain and its keeping me on Delphi 7.
Anyway, here goes.
Ensure that Delphi 2010 has updates 4&5.
Fire up Delphi 2010, then File | New | VCL Forms App. Put a button on the form, put 'ShowMessage( 'hello' ) in the button OnClick event. Save the project and its unit in a local folder "C:\scratch". Build the project, run it, click the button, 'hello' appears, all fine.
On a networked PC (194.168.1.64), create a new folder "c:\DebugTest" and share it with R/W access.
On 194.168.1.64 install the Remote Debugger from the latest download on the Embarcadero Website (RemoteDebugger_upd2.exe). CLick rmtdbg140.exe to run. Accept the 'un-block' message from the firewall.
Edit the DEBUG build configuration compiler settings with Output directory=\192.168.1.64\DebugTest and unit output directory = c:\scratch - see
Edit the Linking settings to set Debug Information=True, Include remote debug symbols=True. See
Leave compiling settings at defaults. See
Do a full build. The relevant project exe 'project2.exe' and 'project2.rsm' appear in the remote folder \192.168.1.64\DebugTest. Blue dots are visible in Unit2 in the IDE.
Set a breakpoint on the 'ShowMessage' line (the button OnClick event).
Use 'Run' | 'Load Process' with Remote path=c:\DebugTest\Project2.exe, Remote Host=192.168.1.64 and Working directory=c:\DebugTest see
Click 'Load'. The visible breakpoint is immediately disabled, the project starts running and opens the CPU window and stops. Pressing f9 cause the exe to run fully on the remote machine, the button works, you just cannot debug it.
I've tried various 'obvious' things like firewall off but all to no avail. Could some kind person suggest further ideas?
Many thanks.
Well, for me the problem has now been solved, although as a 'work around' and after significant interaction with Embarcadero and an upgrade to XE (which also did not work).
It would appear that the remote debugger is flaky (or possibly just picky) in its ability to load rsm (remote symbols) files - they are still looking into why mine wont load. My rsm file is big at around 50Mb although this is no problem for Delphi 7's remote debugger.
The work around involved upgrading to Delphi XE and then choosing the compiler link option 'Place Debug Information in separate TDS file'. This seems to create a tds file onthe remote target instead of a rsm file and breakpoints then work fine.
I've submitted my rsm and tds files to Embarcadero for investigation as to why this happens.
What Windows OS? Maybe run rmtdbg140.exe as admin.
I run D2010 remote debugging on XP versus XP. My How-To is at http://blog.runbits.com/post/Remote-debugging-Delphi.aspx
I had this problem. Installing Update 4 for Delphi 2010 solved my problem. It is also listed in the list of fixed problems of Update 4.
It is imperative to have correct time zone and clock on remote system. In my case I set up remote debugging and when I load process the breakpoints turned green. I checked remote system timezone and clock, set it right and remote dubugger worked again.

Resources