Delphi Debbuger Blue Dot But Red With Cross

Any further meaning-clarification is unnecessary here. The impact of 'double' is that constants such as the names of the 23 ThinkScript colors, like LIGHTRED, BLUE, UPTICK, etc., are not floating point numbers and hence cannot be used in this immediate-if. In this case, the if-expression would be used. Note: While in Location view, depending on your Android version, either tap the Live Tracking icon or tap Live Tracking from the soft menu to start the live tracking feature. If the GPS is enabled on your phone, the location of your phone will be indicated with a blue dot on the map. You will be see a warning message with a reminder.

When I work on my IDE plugins I constantly need to debug the IDE. To make my live a lot easier I wrote an IDE plugin that adds another symbol resolver to the Delphi Debugger, so the debugger can use the *.jdbg files and show the actual function names (including line numbers) in the call stack. Even the CPU view uses more colors to show call, jmp, ret, nop, try/finally/except and more in different colors and resolves call and jump target addresses to their names if available.

In order to identify the code that causes performance issues I use “poor man’s profiling”. I pause the IDE multiple times while the task that takes up the time is running and look at the call stack. If a function comes up in all call stacks, it is is either the culprit or a function that is called very often (or you are just unlucky).

If the task takes really long, pausing the IDE withing the debugger IDE via the pause button is doable, but if the task takes only 2 seconds switching to the other IDE or moving the mouse to the pause button can be too slow, so I use the F12 debug hotkey that Windows reacts to and notifies the debugger to pause the process. Unfortunately Microsoft disabled that feature with Windows Vista. So I had to emulate that functionally with my own IDE plugin that reacts to the F12 hotkey while the debugger is running.

Tools used:

Installing the IDE plugins

Both tools come without an installer, so you have to install them by hand. After extracting the 7z files you have to create two registry entries (Delphi 10.3 Rio):

  1. Start regedit.exe
  2. Navigate to HKEY_CURRENT_USERSoftwareEmbarcaderoBDS20.0Experts
  3. If the “Experts” key doesn’t exist, you have to create it by right clicking on the “20.0” key and select “New/Key”
  4. Add a new String value by right clicking in the listview and select “New/String Value”.
    Name: DebuggerCallStackResolverR103
    Value: C:ThePathToDebuggerCallStackResolverR103.dll
  5. Add another String value by right clicking in the listview and select “New/String Value”.
    Name: DelphiF12HotKeySupport
    Value: C:ThePathToDelphiF12HotKeySupport.dll
  6. Close regedit.exe

Starting the debugger IDE

Start the RAD Studio IDE. There is nothing special here.

Starting the IDE that we want to debug

For IDE plugins and component packages

If you are writing an IDE plugin or want to debug a component, you open your project and in the “Run/Parameters…” dialog set the “Host application” to “$(BDS)binbds.exe” (without the quotes). If you want to use a different registry key for the debugged IDE then you can also set the “Parameters” to “-rMyRegistryKey“. That way the IDE starts with a new registry key having a clean IDE, so it doesn’t have any additional library paths, components or IDE plugins installed that.

Compile and Start your project.

I use the -r command line parameter for my IDE plugins because the debugged IDE has to load the just compiled versions of the DLLs instead of the release versions that are installed into the debugger IDE.

Just for call stacks

If you only want to identify an IDE bug or a performance issue you can start the second IDE without opening any project by using the “Run/Load process…” dialog. Select the “Embarcadero Windows 32bit-Debugger” in the Debugger combo box and set the “Host application” to “$(BDS)binbds.exe” (without the quotes). Set the “After load” radio button to “Run” and press the “Load” button.

Delphi Debbuger Blue Dot But Red With Cross

Skipping the usual startup exception

The IDE throws some exception during the startup, that are handled by the IDE but now that a debugger is attached to the IDE’s process you will see them.

The first exception you may encounter is an EFOpenFile exception for the “%USERPROFILE%sanct.log” file. That has something to do with the product licensing and now that two IDEs are running the first holds the file exclusively open causing the second IDE to fail to open the file. You can ignore this exception (you may add the EFOpenFile exception to the ignore list if you start the debugged IDE multiple times.

The next exception is ESanctSocketException “Cannot start instance counter. Port is already in use (10048).”. Again caused by the product licensing. This time it wants to listen to a port but the debugger IDE already opened that port. Add that exception type to the ignore list because we don’t care about it and the exception type is a special type not like EFOpenFile)

The EFOpenFile exception for the sanct.log file is thrown again. Skip it again.

Delphi Debbuger Blue Dot But Red With Cross

And finally we reach the EAccessViolation from the welcome page (something the IDEFixPack for Rio will fix). Skip that one.

If you are in the editor you may see an EParseError exception. You can add that exception to the ignore list.

Identifying the performance issue

Now you can start the task that you think is taking a lot of time and while it is causing the CPU or I/O usage to be high, you can pause the debugged IDE by pressing the pause button in the first IDE or by pressing the F12 debug break hotkey in the debugged IDE. This brings you usually to the CPU view and you can have a look at the call stack of all the threads by double clicking on a specific thread in the Threads list what shows the thread’s call stack in the Call Stack window.

Delphi debugger blue dot but red with cross design

Can't get the compiled lines blue dots to line up

Forgive my ignorance for not knowing the proper terminology, but when
Delphi includes a line in source code into the compiled result, it puts
a blue dot beside it. My dots don't line up in one of my units so that
I can't debug the unit. This seems to occur half way down the unit, and
I see no special reason why it should be. I've tried deleting lines to
get rid of special characters, I've removed and readded the unit to the
project, I've restarted Delphi, I've restarted my computer, I've deleted
all files for the project that aren't absolutely necessary and can be
rebuilt.

In what it is probably a related problem, I can't the project to realize
that the file is not available also. I can remove the unit from the
project and the project still compiles and builds. The unit is not in
the local directory of the project, and the directory it resides in is
not in the Delphi library path, search path or environment path. When I
Ctrl-left-click on the unit in the uses, it says 'Unable to find'.
When I Ctrl-Return on the unit, it brings up an Open dialog. But it
still compiles and runs!

I'm running BDS4, Update2, and this is a Delphi.Net WinForms
application, though I've seen similar problems since Delpi 4 but it
always went away....

Thank you for any suggestions!

Re:Can't get the compiled lines blue dots to line up


Quote
On Wed, 24 May 2006 16:04:31 -0600, Sean Gifford wrote:
> Forgive my ignorance for not knowing the proper terminology, but when
> Delphi includes a line in source code into the compiled result, it puts
> a blue dot beside it. My dots don't line up in one of my units so that
> I can't debug the unit. This seems to occur half way down the unit, and
> I see no special reason why it should be. I've tried deleting lines to
> get rid of special characters, I've removed and readded the unit to the
> project, I've restarted Delphi, I've restarted my computer, I've deleted
> all files for the project that aren't absolutely necessary and can be
> rebuilt.
This is normally because the line end characters are not CR/LF. AN
easy way to fix this is to open the unit in notepad and save it.
Quote
> In what it is probably a related problem, I can't the project to realize
> that the file is not available also. I can remove the unit from the
> project and the project still compiles and builds. The unit is not in
> the local directory of the project, and the directory it resides in is
> not in the Delphi library path, search path or environment path. When I
> Ctrl-left-click on the unit in the uses, it says 'Unable to find'.
> When I Ctrl-Return on the unit, it brings up an Open dialog. But it
> still compiles and runs!
It will still compile if the dcu/dcuil file is available.

--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com

Re:Can't get the compiled lines blue dots to line up


Quote
Marc Rohloff [TeamB] wrote:
> On Wed, 24 May 2006 16:04:31 -0600, Sean Gifford wrote:

>>Forgive my ignorance for not knowing the proper terminology, but when
>>Delphi includes a line in source code into the compiled result, it puts
>>a blue dot beside it. My dots don't line up in one of my units so that
>>I can't debug the unit. This seems to occur half way down the unit, and
>>I see no special reason why it should be. I've tried deleting lines to
>>get rid of special characters, I've removed and readded the unit to the
>>project, I've restarted Delphi, I've restarted my computer, I've deleted
>>all files for the project that aren't absolutely necessary and can be
>>rebuilt.

> This is normally because the line end characters are not CR/LF. AN
> easy way to fix this is to open the unit in notepad and save it.

>>In what it is probably a related problem, I can't the project to realize
>>that the file is not available also. I can remove the unit from the
>>project and the project still compiles and builds. The unit is not in
>>the local directory of the project, and the directory it resides in is
>>not in the Delphi library path, search path or environment path. When I
>> Ctrl-left-click on the unit in the uses, it says 'Unable to find'.
>>When I Ctrl-Return on the unit, it brings up an Open dialog. But it
>>still compiles and runs!

> It will still compile if the dcu/dcuil file is available.

Thanks for the suggestion, but the problem seems to run deeper than
that. Again, I removed the unit from the project. This time I searched
for the file, deleted all dcuil files and renamed the source file. So -
for all intents and purposes the file no longer physically exists, nor
any precompiled version of it. The project STILL compiles and builds!?

I tried the Notepad thing and it didn't help. I did make sure that I
made some visible changes to the file to verify that BDS was using the
file I thought it was....

All of this is for naught, I suppose, as I created a new project, adding
the very same units that were in the original, and everything now reacts
as expected. Next time I won't waste an afternoon and do this directly.

But

Re:Can't get the compiled lines blue dots to line up


Quote
Sean Gifford wrote:
> Marc Rohloff [TeamB] wrote:

>> On Wed, 24 May 2006 16:04:31 -0600, Sean Gifford wrote:

>>> Forgive my ignorance for not knowing the proper terminology, but when
>>> Delphi includes a line in source code into the compiled result, it
>>> puts a blue dot beside it. My dots don't line up in one of my units
>>> so that I can't debug the unit. This seems to occur half way down
>>> the unit, and I see no special reason why it should be. I've tried
>>> deleting lines to get rid of special characters, I've removed and
>>> readded the unit to the project, I've restarted Delphi, I've
>>> restarted my computer, I've deleted all files for the project that
>>> aren't absolutely necessary and can be rebuilt.

>> This is normally because the line end characters are not CR/LF. AN
>> easy way to fix this is to open the unit in notepad and save it.

>>> In what it is probably a related problem, I can't the project to
>>> realize that the file is not available also. I can remove the unit
>>> from the project and the project still compiles and builds. The unit
>>> is not in the local directory of the project, and the directory it
>>> resides in is not in the Delphi library path, search path or
>>> environment path. When I Ctrl-left-click on the unit in the uses,
>>> it says 'Unable to find'. When I Ctrl-Return on the unit, it brings
>>> up an Open dialog. But it still compiles and runs!

>> It will still compile if the dcu/dcuil file is available.

> Thanks for the suggestion, but the problem seems to run deeper than
> that. Again, I removed the unit from the project. This time I searched
> for the file, deleted all dcuil files and renamed the source file. So -
> for all intents and purposes the file no longer physically exists, nor
> any precompiled version of it. The project STILL compiles and builds!?

> I tried the Notepad thing and it didn't help. I did make sure that I
> made some visible changes to the file to verify that BDS was using the
> file I thought it was....

> All of this is for naught, I suppose, as I created a new project, adding
> the very same units that were in the original, and everything now reacts
> as expected. Next time I won't waste an afternoon and do this directly.

Actually, the new project didn't fix the problem. As it turns out, I
had added the unit, but that unit was included in an assembly referenced
by the project. So I guess when I thought I was using the unit, I was
really using the assembly. How would I prevent this from happening
again (wanting to use the unit directly, not through an assembly, while
still keeping the reference to the assembly)?

Thanks!

Delphi Debugger Blue Dot But Red With Cross Pattern

Re:Can't get the compiled lines blue dots to line up


Quote
On Thu, 25 May 2006 12:23:58 -0600, Sean Gifford wrote:
> Actually, the new project didn't fix the problem. As it turns out, I
> had added the unit, but that unit was included in an assembly referenced
> by the project. So I guess when I thought I was using the unit, I was
> really using the assembly. How would I prevent this from happening
> again (wanting to use the unit directly, not through an assembly, while
> still keeping the reference to the assembly)?
You can't because then you would be including the unit twice. How do
you know which one you are calling?

--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com

Re:Can't get the compiled lines blue dots to line up


Quote
On Thu, 25 May 2006 12:23:58 -0600, Sean Gifford wrote:
> Actually, the new project didn't fix the problem. As it turns out, I
> had added the unit, but that unit was included in an assembly referenced
> by the project. So I guess when I thought I was using the unit, I was
> really using the assembly. How would I prevent this from happening
> again (wanting to use the unit directly, not through an assembly, while
> still keeping the reference to the assembly)?
BTW, This would also explain your problem with the blue dots. The
source file has probably changed since the assembly was compiled so
the line numbers don't match.

--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com

Re:Can't get the compiled lines blue dots to line up


Quote
Marc Rohloff [TeamB] wrote:
> On Thu, 25 May 2006 12:23:58 -0600, Sean Gifford wrote:

>>Actually, the new project didn't fix the problem. As it turns out, I
>>had added the unit, but that unit was included in an assembly referenced
>>by the project. So I guess when I thought I was using the unit, I was
>>really using the assembly. How would I prevent this from happening
>>again (wanting to use the unit directly, not through an assembly, while
>>still keeping the reference to the assembly)?

> BTW, This would also explain your problem with the blue dots. The
> source file has probably changed since the assembly was compiled so
> the line numbers don't match.

Right, once I removed the assembly and built everything was fine.

Re:Can't get the compiled lines blue dots to line up


Quote
Marc Rohloff [TeamB] wrote:
> On Thu, 25 May 2006 12:23:58 -0600, Sean Gifford wrote:

>>Actually, the new project didn't fix the problem. As it turns out, I
>>had added the unit, but that unit was included in an assembly referenced
>>by the project. So I guess when I thought I was using the unit, I was
>>really using the assembly. How would I prevent this from happening
>>again (wanting to use the unit directly, not through an assembly, while
>>still keeping the reference to the assembly)?

> You can't because then you would be including the unit twice. How do
> you know which one you are calling?

The only way I clued in on this was when I tried to step into another
function also in the unit and in the assembly. Instead of stepping in,
it stepped over. Strangely, it did try to step in on the original
function and that's how this all started....

More detail:
The shared unit I'm referring to is called DBConfigLib, has two function
LoadConfiguration and GetServiceName.
This unit is compiled into an assembly, call it My.DB, which is actually
a Delphi .Net package
The project has reference to My.DB.dll and DBConfigLib.pas has been
added to the project.
My interface uses a My.DB namespace and my implementation uses includes
DBConfigLib.
What happened to me is I called LoadConfiguration and it stepped over
when I tried to step in. I tried calling DBConfigLib.LoadConfiguration
and the same thing happened. I tried stepping into GetServiceName and
it went into DBConfigLib.pas, but then the blue dot thing happened....
I resolved this after testing between removing the assembly and removing
the unit by finally removing the unit from the project and calling
My.DB.Namespace.DBConfigLib.LoadConfiguration and
My.DB.Namespace.DBConfigLib.GetServiceName

Where as once GetServiceName was not returning the expected result, it
did once I called the assembly function. No errors, though, no
indication otherwise of anything wrong.

Maybe I'm just misunderstanding a fundamental Delphi .Net detail?

1. Cannot see the blue dot, missing blue dot

2. debugging compile error - crazy blue dots

3. Blue mood, blue dots...

4. No blue dots in gutter, can't set a breakpoint

5. System.Append doesn't get blue dot

6. Compiling Delphi from the command line - OR - How the hell does Delphi compile its projects

Delphi Debugger Blue Dot But Red With Cross And Light

Delphi debugger blue dot but red with cross and light

Delphi Debugger Blue Dot But Red With Cross Stitch

7. command line blues

8. Dotted lines

Delphi Debugger Blue Dot But Red With Cross Design

9. Thick dotted lines

10. ? Modify appearence of dotted lines ?

Delphi Debugger Blue Dot But Red With Cross Reference