Delphi Debbuger Blue Dot But Red With Cross

Essential Cookies: Certain cookies are necessary in order for you to use our websites. These are used 'in-session' each time you visit and then expire when you leave the site. Feb 27, 2016 The problem is using the TMapView. I should be able to show the user location on the map, live as a blue glowing dot. In the example code given, if you build it in 10.3, the blue dot shows. If you use exactly the same code in 10.4 you get the exception mentioned. Jan 06, 2016 Add our procedure privileges as above (including DEBUG on the schema), activate the role, restart debugging of the procedure and Et voila. Our red cross has happily transformed into a green tick and we’re off debugging! I don’t know about you, but there’s a special, warm place in my heart reserved for green ticks. Jul 24, 2018 The red dot now has a blue arrow over it – that indicates the current line. The program is now paused in the debugger. You can do several things – run it, so it continues; step line by line, so it executes the ShowMessage line but stops at the next, and so forth.

I’ve been working to build a deliverable package in HANA (UI5 application and supporting back-end) to send out to customers. And part of the development process, as many readers will know, is debugging stored procedures. In some cases, you’re awesome, and you don’t need to do this – “I know it works, I wrote it”. But sometimes, just sometimes, it’s helpful to turn to the debugger to see why a particular piece of functionality is not working as expected. But what to do when you don’t have the auths to debug your own stored procedure?! Eeeeep!

To set the scene, I’m writing a UI5 app, with an OData HANA-only (i.e. no Gateway here) back-end, and have in place a number of OData modification exits. The modification exits are mostly stored procedures (.hdbprocedure files). Read up on these over here: Custom Exits for OData Write Requests – SAP HANA Developer Guide for SAP HANA Studio – SAP Library

I’ve got an update modification exit on one of my OData entities, Forecasts.

service {

“fa.apps.hpc.xs.views.forecasts::forecasts_by_user_view” as “Forecasts” key (“id”)

navigates(

“ForecastFields” as “Fields”,

“ForecastDataSet” as “DataSet”,

“ForecastRuns” as “Runs”

)

create using “fa.apps.hpc.xs.procedures.forecast::createForecast”

delete using “fa.apps.hpc.xs.procedures.forecast::delimitForecast”

update using “fa.apps.hpc.xs.procedures.forecast::updateForecast”;

}

That’d be this guy, in bold. If you’re savvy, an update modification exit stored procedure needs a particular signature.

PROCEDURE “FA_APPS”.”fa.apps.hpc.xs.procedures.forecast::updateForecast” (

IN new <TABLE_DEFN>,

IN old <TABLE_DEFN>,

OUT outtab <HTTP_ERRORS DEFN>

)

LANGUAGE SQLSCRIPT

SQL SECURITY INVOKER

— DEFAULT SCHEMA <SCHEMA>

AS

— READS SQL DATA AS

BEGIN

— Weave your update magic here

END;

I wanted to debug it, just for fun (actually, for a very real reason). The trouble I found however, is that because this stored procedure exists in another schema to my user’s one, debugging is no longer automatically available. In Eclipse (I use Eclipse with HANA Add-ons, not HANA Studio, although effectively the same thing) you’ll still be able to set the breakpoint, as per below. Nice blue dot. Perfect! Break point set.


But when you start debugging said procedure, you’ll notice a little cross over your breakpoint.

Nooooooooooooooooooo!!!!!!!!

That didn’t happen before when the stored proc belonged to my schema. But of course, that was my schema. My user owns it and everything in it, including debug privileges for all stored procedures. So I messed around a bit, not quiet grasping what was required here. I also followed the inimitable Rich Heilman’s instructions, which you can peruse over here:Unable to Debug a activated Procedure in HANA XS environment. but they didn’t quite do what I needed. Presumably, I already had sufficient auths in HANA to debug a procedure, but I didn’t have auths to debug this procedure. So I persevered. As you do. And keep doing. And keep on doing… until eventually it clicked! Hunting though the Object Privileges I could apply to my user, low and behold, I see my stored procedure in the list:

“Hmmmmm” I think to myself. “I wonder what will happen if I…”

And there you have it. Once you add the stored proc to your user under Object Privileges, you then determine what specific privileges you should have (note: I’m logged in here as a user with user admin auths, so I can grant privileges to my user, but you could just as well use SYSTEM or whatever if this is not an important HANA instance).

Delphi Debugger Blue Dot But Red With Cross Pattern

So that’s lovely to know. I can add stored proc auths directly to my user. But this is going to be a deliverable package/app. It follows that I should define such auths in an HDB Role artifact – heck, I’m doing that already for all other components of this app, so best keep on point. So, for the purposes of this post, I’ll demonstrate adding this to my existing HDB Role artifact. Were you to do this productively, you might consider creating a separate .hdbrole file for debug/administration of the app. I’ll keep everything all together for now. I should note, that I am not saving my user with the privileges above. I don’t want to have to apply individual privs to each and every user – I already have an .hdbrole file, so I’ll use that. Please also note that, shortly after writing this post, I found Rich’s post on pretty much exactly this topic. New SQLScript Features in SAP HANA 1.0 SPS7 – specifically, the last section Debugging Authorisation Concept. I’ve basically just expounded on what’s covered in this post, and the one I linked to earlier.

Right then, to my HDB Role! Now, this role is already applied to my user. So any changes to it should automatically apply to my user too.

role fa.apps.hpc.xs.roles::USER_ROLE {

Delphi debbuger blue dot but red with crossover

// This is a very broad smattering of privileges for a schema, and will be paired back once the supporting

// stored procedures are in place.

schema fa.apps.resources:FA_APPS.hdbschema: SELECT, INSERT, UPDATE, DELETE, EXECUTE, DEBUG;

// Lots of guff here

// Here’s the stored procedure declaration with the required privileges – EXECUTE and DEBUG

catalog sql object “FA_APPS”.”fa.apps.hpc.xs.procedures.forecast::updateForecast” : EXECUTE, DEBUG;


// Lots of guff here

}

Add our procedure privileges as above (including DEBUG on the schema), activate the role, restart debugging of the procedure and…

Et voila. Our red cross has happily transformed into a green tick and we’re off debugging! I don’t know about you, but there’s a special, warm place in my heart reserved for green ticks.

#happysigh

In the debugger…

We are breaking exactly out our breakpoint now. Excellent.

This is just a smattering of information about the gauntlet that can be HANA auths. The thing is, they’re not really complicated. But it can be hard sometimes to figure out what’s required. As this post ironically proves.

For completeness:

My instance is HANA Developer Edition, hosted in AWS via. CAL, ver 1.00.091 (SPS9)

Eclipse is Mars running latest HANA and UI5 Add-ons

Credit for both references to Rich Heilman

Blue Dots missing

I have a unit where there are no blue dots. Furthermore, at run time you
can't set break points in this unit and viewing the stacktrace will
never show any lines from that unit. Stepping through code always skips
that unit as well (the code is ran, it just won't stop there).

It wasn't always like this, but we can't figure out what we've changed.
It's a large unit and I wonder if we've hit some limit somewhere in Delphi.

Any suggestions?

We're on D5

Re:Blue Dots missing


Quote
'preston' <ora...@xmission.com> wrote in message
news:4358efe3$1@newsgroups.borland.com...
Quote
>I have a unit where there are no blue dots. Furthermore, at run time you
>can't set break points in this unit and viewing the stacktrace will never
>show any lines from that unit. Stepping through code always skips that unit
>as well (the code is ran, it just won't stop there).
Chances are you've got a version of that unit open in the IDE which is not
the one that is really part of the project.

--

Download the latest draft (version 1.23, updated 10/2/2005) of
'STILL CASTING SHADOWS: Two American Families 1620-2006'
by Blackbird Crow Raven: http://cc.borland.com/ccweb.exe/listing?id=23106

Re:Blue Dots missing


Quote
> Chances are you've got a version of that unit open in the IDE which is not
> the one that is really part of the project.
I wish it were that simple. This problem has been going on for over a
year now. We've hunted for missing CR LF's and other invalid characters.
We've tried everything we can think of.

Is the source code for the blue dots included with Delphi?

Re:Blue Dots missing


Have you tried deleting .tds file, precompiled headers and then doing a
build.
Alternatively, is that unit's directory in debug path (Tools-Options)
HTH Pete
Quote
'preston' <ora...@xmission.com> wrote in message
news:4358fa14$1@newsgroups.borland.com...
Quote
>> Chances are you've got a version of that unit open in the IDE which is
>> not the one that is really part of the project.

> I wish it were that simple. This problem has been going on for over a year
> now. We've hunted for missing CR LF's and other invalid characters. We've
> tried everything we can think of.

> Is the source code for the blue dots included with Delphi?

Delphi Debugger Blue Dot But Red With Cross Stitch

Re:Blue Dots missing


Quote
Pete Fraser wrote:
> Have you tried deleting .tds file, precompiled headers and then doing a
> build.
> Alternatively, is that unit's directory in debug path (Tools-Options)
> HTH Pete
Since this started we've built three new machines and the problem exists
on them as well. The only thing similar between them are the pas, dfm,
and dpr files. Everything else we let Delphi create.

1. I don't have a tds, blowing the dcu's aways doesn't help. I don't see
a debug path anywhere, but it is in lib path. Other units in the same
folder work just fine.

It feels like a limitation in Delphi somewhere.

Re:Blue Dots missing


Quote
preston wrote:
> I have a unit where there are no blue dots. Furthermore, at run time you
> can't set break points in this unit and viewing the stacktrace will
> never show any lines from that unit. Stepping through code always skips
> that unit as well (the code is ran, it just won't stop there).

> It wasn't always like this, but we can't figure out what we've changed.
> It's a large unit and I wonder if we've hit some limit somewhere in Delphi.

> Any suggestions?

> We're on D5

After searching QC it feels like issue 6235. I really hate this problem
and wish Borland would do something about it.

Re:Blue Dots missing


Quote
Chris Morgan wrote:
> Hi,

> Do you have
> {$L-} or
> {$LOCALSYMBOLS OFF}
> defined in the .pas files?
> If so, this will turn off debugging for that unit.

> Cheers,

> Chris

Don't have them.. thanks though.

Re:Blue Dots missing


Hi,

Do you have
{$L-} or
{$LOCALSYMBOLS OFF}
defined in the .pas files?
If so, this will turn off debugging for that unit.

Cheers,

Chris

Re:Blue Dots missing


Quote
preston wrote:
> I have a unit where there are no blue dots. Furthermore, at run time you
> can't set break points in this unit and viewing the stacktrace will
> never show any lines from that unit. Stepping through code always skips
> that unit as well (the code is ran, it just won't stop there).

> It wasn't always like this, but we can't figure out what we've changed.
> It's a large unit and I wonder if we've hit some limit somewhere in Delphi.

> Any suggestions?

> We're on D5

Ok, I just wiped out the entire implementation section, then did a
Shift- Ctrl- C to let Delhi recreate everything. I still don't have any
blue dots.

The only thing different is that the single blue dot that I had on the
very last 'end' is gone. I didn't mention that dot before because I
didn't think it important.

Anway, does it this mean it's the interface? Could it be the DFM somehow?

Re:Blue Dots missing


Quote
preston wrote:
> I have a unit where there are no blue dots. Furthermore, at run time you
> can't set break points in this unit and viewing the stacktrace will
> never show any lines from that unit. Stepping through code always skips
> that unit as well (the code is ran, it just won't stop there).

> It wasn't always like this, but we can't figure out what we've changed.
> It's a large unit and I wonder if we've hit some limit somewhere in Delphi.

> Any suggestions?

> We're on D5

Try Following... not sure if it will work...

1 Check that dfm is in Text mode
2 Copy all Source of the unit into a new file into a text editor (for
example notepad)
3 Get the Source view of the form and copy it also to another file to a
text editor
4 make a backup copy of the dfm an pas file.;-)
5 delete the dfm and pas file
6 create the pas and dfm manually and paste code and dfm into the
correct place..
7 cross fingers and look after compiling if the blue dots appear
again... :-)

Once this happened to me and I found that a special char was mixed in
the source, it was
not visible at the IDE Code Editor but I could see it with a Hex editor..

I hope this solves you the problem..

Regards,
John

Re:Blue Dots missing


It's somehow related to my TTables and persistent fields.

I've created a new project and copied over every non visual control from
the affectd unit. Compiling this unit shows there are no blue dots. As I
begin to drop tables I hit a magic point at which the blue dots show up.
I can get this down to a removing a single field. Adding the field back
in causes the dots to dissappear, where as removing it causes the dots
to appear.

Sounds like a DM can only have so many persitant fields. To test that I
created another DM and copied over my biggest table. Then I copied it
numerous times until I was well past the total number of fields in the
srouce DM. It still has blue dots.

Then I copied in some of the other tables and I finally lost my dots. So
it seems to be the product of fields from different tables. Does Delphi
know that I was copying the original table a bunch of times and then did
some compiler magic that made them all the same or somthing?

Any ideas? What's the pattern?

Re:Blue Dots missing


Quote
preston wrote:
> It's somehow related to my TTables and persistent fields.

> I've created a new project and copied over every non visual control from
> the affectd unit. Compiling this unit shows there are no blue dots. As I
> begin to drop tables I hit a magic point at which the blue dots show up.
> I can get this down to a removing a single field. Adding the field back
> in causes the dots to dissappear, where as removing it causes the dots
> to appear.

> Sounds like a DM can only have so many persitant fields. To test that I
> created another DM and copied over my biggest table. Then I copied it
> numerous times until I was well past the total number of fields in the
> srouce DM. It still has blue dots.

> Then I copied in some of the other tables and I finally lost my dots. So
> it seems to be the product of fields from different tables. Does Delphi
> know that I was copying the original table a bunch of times and then did
> some compiler magic that made them all the same or somthing?

> Any ideas? What's the pattern?

may I suggest that with fields missing you could not cleaning compile
your code so - - no blue dots - - which show up in the source code after
the code is cleanly compiled. Adding the fields back in - - the code
would compile cleanly.

I found doing not just a build but a build project tends to clean this
up and has been mentioned in the past year by others in this newsgroup.

Also I have heard that people found out that an old/other version of the
source code was having it's DCU being used and not the *.pas file they
thought they were using. So of course the blue dots can not show up - -

This tended to be a library path issue most of the time.

Jim P.

Re:Blue Dots missing


'Jim P' <Ji...@mad.scientist.com> wrote

Quote
> I found doing not just a build but a build project tends to clean this up
> and has been mentioned in the past year by others in this newsgroup.
Try Preston's source code from the zip in attachments
(Missing Blue Dots project) yourself. I can reproduce
his problem. Regards, JohnH

Re:Blue Dots missing


'preston' skrev :

Quote
>> I have a unit where there are no blue dots.
>> We're on D5
Same kind of limitation in D2005
I tested the attached project and no blue dots,
except for the last line.

/ia

Re:Blue Dots missing


'Ingvar Anderberg' <whate...@foundit.com> wrote

Quote
> Same kind of limitation in D2005
> I tested the attached project and no blue dots,
> except for the last line.
Ingvar,

Would you be so kind as to add your comment to
Preston's QC report 20462.

If I am reading the related QC report 7358 correctly, then
at least some of the 'missing blue dots' problems may
be fixed in the future Dexter product.

--

Thanks, JohnH
Quality Central, bug status & reporting http://qc.borland.com/
QC discussion is in newsgroup 'borland.public.bdn.qualitycentral'.

1. Cannot see the blue dot, missing blue dot

2. Blue dots missing

Delphi

3. missing blue dots

4. Blue mood, blue dots...

5. disappearing blue dots

6. Where did the blue dots go?......I hope it is easy to find them again :-)

7. What are the Blue Dots?

8. Gutter blue dots

9. Little blue dots?

10. How do I get the blue dots back??