Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6202315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:42:40+00:00 2026-05-24T04:42:40+00:00

The debugger does not locate the line of the exception, its either to deep

  • 0

The debugger does not locate the line of the exception, its either to deep or to late.

Code:

procedure LoadLogo;
const
  RES_APP_LOGO = 'AppAboutLogo';
var
  resourceStream : TResourceStream;
begin
  try
    resourceStream := TResourceStream.Create( HInstance, RES_APP_LOGO, RES_TYPE_FXRESOURCES );
    resourceStream.Position := 0;
    ImageLogo.Picture.Bitmap.LoadFromStream(resourceStream); //---> causes exception (A)
    Refresh();
  finally
    FreeAndNil(resourceStream);    
  end;
end;

procedure TForm.Initialize;
begin

  //do something....

  LoadLogo(); //(C)

  AnotherFunction();  //<----- debugger points here (B)

end; 

procedure TForm.CreateCreate(Sender : TObject);
begin
  Initialize();
end;

On an exception at location (A), with “Use Debug DCUs” = false, the debugger points to (B), the line outside the function called after the exception occurred. With “Use Debug DCUs = true”, it breaks in a generic Exception thrower in Graphics.pas. The exception class is fine, the location is not correct or useful from a debugging perspective – neither the calling location (C) nor the real cause point (A) is located.

This requires looking at the call stack to step back to the cause which does not seem right.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:42:40+00:00Added an answer on May 24, 2026 at 4:42 am

    When you are using debug DCUs you need to use the call stack to see how execution reached the throw. There’s no way for the debugger to break any earlier than the point at which the exception is raised.

    Without debug DCUs the debugger can only break at a line of code for which it has debug information. That has to be somewhere in your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am seeing debug statements in the console but the debugger does not stop
This following code snippet works in FF, IE and Chrome. However It does not
The debugger does not want to step into an unused variable. If I declare
Either my debugger is broken or there's something fundamental that I am not understanding.
I wish to print a Stack<Integer> object as nicely as the Eclipse debugger does
I keep wondering how does a debugger work? Particulary the one that can be
I am working on OpenCL. Does anyone know of a good debugger for OpenCL
My debugger keep jumping into debugging the IL instead of jumping to debug code
My debugger is not working, I'm putting a breakpoint, but in run, time visual
I know you need to turn on the 'Native Code' debugger in order to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.