Jump to content

Search the Community

Showing results for tags 'debugger'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Found 4 results

  1. Debbie Erickson

    Debug error Meaning?

    Hi. I'm getting a strange (to me) error when debugging a project. The project contains an application and a dll. I have both subprojects open in a project group. I have set some breakpoints in a function within the dll. The functions are initially called from the application. In the dll's function, I have a local variable that's being assigned to. Immediately after the assign statement, I tried to inspect what was in the local variable. The local variable is of a custom-defined class type. When I hit the breakpoint to see what is in that variable called "vo", I get an error message of "error inspecting vo - expression error" Is this related to my debugger settings? In the project, I turned off optimization. Can somebody maybe help me understand and fix this? The first loop checks for a count on a list. The debugger is showing that the count is 1. So the assignment of position 0 should have retrieved the data to the local variable of "vo". Below the code are my project settings for the debugging. function UpdateVendOrdCarrier(Order: TsqlOrderRecord; aVendorCode: string = ''; showWarning: boolean = false): boolean; var i: integer; j: integer; k: integer; CurrCarrierType: char; CurrCarrier: string; CurrShipCode: string; CurrShipMinWk: byte; CurrShipMaxWk: byte; cst: TsqlCustomerRecord; vo: TsqlVendOrdRecord; ShipToState: string; ShipToZip: string; //ManualCarrier: boolean; vsp: TVendorShippingPointRecord; NonStandardWarehouseUsed: boolean; nonDefaultWareHouseCarrId: Integer; carriers: TCarrierList; dcId: string; changed: boolean; lastUsedDc: string; warnings: string; begin changed := FALSE; // for all vendors, recheck the Carriers, this could be because of ShipTo Changes // or we added an Item that changes the Carrier for this Vendor Order result := false; for i := 0 to Order.VendOrdList.count - 1 do begin vo := Order.VendOrdList[i]; if ((aVendorCode = '') or ((aVendorCode <> '') and (vo.VendorCode.data = aVendorCode))) and ((not (vo.RecordState in [rsDelete, rsDeleted]))) // No Changes to invoiced Vendor Orders and ((vo.Status.data = ' ') or (Order.OrderType.data = 'Q')) then begin // Use the Ship To Customer State ShipToState := Order.ShipToCustRec.State.data; ShipToZip := Order.ShipToCustRec.ZipCode.data; // If there is an Installer then use the Installers State for k := 0 to Order.CustomerList.count - 1 do begin if (not (Order.CustomerList[k].RecordState in [rsDelete, rsDeleted])) and (Order.CustomerList[k].TypeCode.data = 'I') then begin cst := TsqlCustomerRecord.CreateAndLoadCustomer(Order.CustomerList[k].CustomerOID.data); ShipToState := cst.State.data; ShipToZip := cst.ZipCode.Data; FreeAndNil(cst); break; end; end; CurrCarrierType := ' '; CurrCarrier := vo.ActlCarrier.data; //ManualCarrier := (vo.Carrier.data <> '') and (vo.ActlCarrier.data <> '') and // (vo.ActlCarrier.data <> vo.Carrier.data); // if uOrderCarrierService.TOrderCarrierService.Instance.ManuallyCarrierChangesOnly(vo, NonStandardWarehouseUsed) then // CurrCarrierType := vo.CarrierType.data; CurrShipCode := vo.ShipCode.data; CurrShipMinWk := vo.ShipMinWk.data; CurrShipMaxWk := vo.ShipMaxWk.data; NonStandardWarehouseUsed := false; vsp := vo.VendorRecord.ShippingPointList.GetShippingPoint(ShipToState); lastUsedDc := ''; if not assigned(vsp) then begin // ShipToState := CurrentLocation.CoAddr.State.data; vsp := vo.VendorRecord.ShippingPointList.GetShippingPoint(CurrentLocation.CoAddr.State.data); end; for j := 0 to vo.VendDtlList.Count - 1 do begin if assigned(vsp) and (vo.VendorCode.data = 'TDQ') and (vsp.DCIdentifier.data <> vo.VendDtlList[j].DCIdentifier.data) then begin if WarehouseManagementSystem.DCCanShip(vsp.DCIdentifier.Data) and WarehouseManagementSystem.DCCanShip(vo.VendDtlList[j].DCIdentifier.data) then begin if (not TCarrierList.IsCollectCarrier(vo.ActlCarrier.Data)) then NonStandardWarehouseUsed := true; // <> 'CLCT'; dcId := vo.VendDtlList[j].DCIdentifier.data; end else if WarehouseManagementSystem.DCCanShip(vo.VendDtlList[j].DCIdentifier.data) then begin if (length(lastUsedDc) > 0) and (lastUsedDc <> vo.VendDtlList[j].DCIdentifier.data) then NonStandardWarehouseUsed := True else if not WarehouseManagementSystem.DCUsesCarrier(vo.VendDtlList[j].DCIdentifier.data, vo.ActlCarrier.data) then NonStandardWarehouseUsed := True; lastUsedDc := vo.VendDtlList[j].DCIdentifier.data; end; end; end; if (assigned(vo.VendOrdLastMileCarrierRecord) and (not string.IsNullOrWhiteSpace(vo.VendOrdLastMileCarrierRecord.ProviderName.Data))) then begin AdjustLeadTimesForLMC(vo); CurrShipMinWk := vo.ShipMinWk.data; CurrShipMaxWk := vo.ShipMaxWk.data; end; if uOrderCarrierService.TOrderCarrierService.Instance.ManuallyCarrierChangesOnly(vo, not NonStandardWarehouseUsed, function(venddtlLine: TsqlVendDtlRecord): boolean var tmsContext: TTmsContext; begin tmsContext := TTmsContext.CreateNew(vo); try SystemSetVendDtlCarrierLine(tmsContext, venddtlLine, result); finally FreeAndNil(tmsContext); end; end ) then begin CurrCarrierType := vo.CarrierType.data; end; for j := 0 to vo.VendDtlList.Count - 1 do begin // After and Item is added, this function gets called and we may have a // combination of N, T or I on the Items. // After F4 Carrier selection, this functioon is also called, // but the Carrier For will set the CarrierType on all of the existing Items // to match the carrier type of the selected carrier. if (not (vo.VendDtlList[j].RecordState in [rsDelete, rsDeleted])) and (vo.VendDtlList[j].Status.data <> 'X') and (vo.VendDtlList[j].VendorCode.data = vo.VendorCode.data) then begin case vo.VendDtlList[j].carrierType.Data of 'N': if CurrCarrierType = ' ' then CurrCarrierType := 'N'; 'T': if CurrCarrierType in [' ', 'N'] then CurrCarrierType := 'T'; 'I': if CurrCarrierType in [' ', 'N', 'T'] then CurrCarrierType := 'I'; end; if vo.VendDtlList[j].ShipMaxWk.data > CurrShipMaxWk then begin CurrShipMinWk := vo.VendDtlList[j].ShipMinWk.data; CurrShipMaxWk := vo.VendDtlList[j].ShipMaxWk.data; end; if pos(vo.VendDtlList[j].ShipCode.Data, 'ISO') > pos(CurrShipCode, 'ISO') then CurrShipCode := vo.VendDtlList[j].ShipCode.Data; end; end; if (not vo.ManLeadTime.data) or (trim(vo.ShipCode.AsString) = '') then begin changed := changed or (vo.ShipCode.AsString <> currShipCode) or (vo.ShipMinWk.Data <> currShipMinWk) or (vo.ShipMaxWk.data <> currShipMaxWk); vo.ShipCode.AsString := CurrShipCode; vo.ShipMinWk.data := CurrShipMinWk; vo.ShipMaxWk.data := CurrShipMaxWk; end; HandleNonDefaultWarehouseMoves(changed, vo, CurrCarrierType, NonStandardWarehouseUsed); HandleDefaultCarrierChanges(changed, Result, Order, vo, ShipToState, ShipToZip, CurrCarrierType, NonStandardWarehouseUsed, j); DcDeliveryProgramService.TDCDeliveryProgramService.Instance.UpdateCarriersForDcDeliveryProgram(vo.OrderRecord, ((CurrCarrier <> vo.ActlCarrier.data) and not (TDCDeliveryProgramService.Instance.CarrierManaullySet(vo)) ) ); ExpectedArrivalDateService.TExpectedArrivalDateService.Instance.UpdateArrivalDateIfNeeded(vo); UpdateTmsCarrierSettings(vo, true); TOrderSystemLibrary.Instance.EnsureCurrentFeightValues(vo); if aVendorCode <> '' then break; end; end; // only display the carrier options changed if something really changed. changed := changed and ( (vo.ShipCode.AsString <> currShipCode) or (vo.ShipMinWk.Data <> currShipMinWk) or (vo.ShipMaxWk.data <> currShipMaxWk) or (vo.Carrier.Data <> CurrCarrier) or (vo.CarrierType.Data <> CurrCarrierType) ) ; if changed and showWarning then begin NBFDialogs.NBFMessageDlg(format('%s: Carrier options carrier has been changed, Please confirm delivery options.', [vo.VendorCode.Data]), mtWarning, [mbok], mrok, 0, false, 'Verify Carrier Options'); end; end;
  2. Ken Aiken

    Changing Windows 64-bit Debugger

    I realized today I don't think I'm using the new LLDB debugger in my 10.4 install. I checked Debugger in the Options windows and the old one is bold when a project is set to 64-bit. I can't figure out how to change which debugger I'm using. I to select the LLDB debugger there and nothing changes. How do I switch debuggers or at least make sure I'm using the LLDB debugger
  3. I'm running Delphi XE7, and mysteriously/randomly Delphi XE7 will sometimes ONLY show the CPU view when debugging my 64-bit Windows app, and not let me step through any Pascal source. It will stop on a breakpoint but only show CPU view when the breakpoint is hit, and right click - View Source does nothing. When this occurs, if I go to the Modules view, none of the entry points and addresses are showing up for the program's .EXE itself. I can debug a .DLL module used by my project, that was compiled in Delphi, because the module entry points and addresses do show up when I click on that .DLL in the modules window, unlike when I click on the main .EXE in that same Modules window. When this issue occurs, quitting Delphi and restarting it does not resolve it. If I reboot the entire computer, this issue can resolve itself but may start happening again the same day. Today it occurred, and I rebooted, and it resolved it, but then it happened the 2nd time I ran the program in the IDE, which is very frustrating. I have yet to find a way to get the issue to resolve without rebooting. When this issue occurs with my project, I'm able to load a different 64-bit Delphi project and debug it, so it is not a matter of the XE7 debugger itself failing to load module entry points for the main .exe of all 64-bit apps, just the project I want to work on, and it's very mysterious, because I've gone a week or two at a time without the issue occurring with my project and then it happens and rebooting the machine is the only thing that may resolve it, at least temporarily. By the way, the Modules view does show the Base Address, Module Name and .rsm file for the program's .EXE but, again, when you click on the main exe then none of the entry points and addresses are showing up. I'll also mention that I can debug other projects with the same settings as my project when this issue occurs. When this issue occurs, and the main .EXE module is loaded for my project the Event Log does still indicate that the main .EXE has debug info. Any idea why this is occurring, and will it still occur after upgrading to the latest version of Delphi? I keep getting sales calls about upgrading. This was never an issue when I debugged 32-bit apps. Thanks, J.
  4. Cirrus22

    OSX Debugging Issue - How?

    Hi, First time here (just got the Google Groups and it has died). Look, this might be a simple issue and if it is I apologise, but it is driving me spare. Reading the literature I was under the impression you could build for OSX and use the debugger as you would in say a Win32 app,ication, ie. you would have breakpoints and could single step through the code if required. When I build for OSX I have never seen anything like this. The Event Log always says 'No Debug Info'. The best I have been able to do is to use log.d from FMX.Types to show log messages in the PAServer window. I really have tried searching everywhere and anywhere and cannot see anything that would enable what I would call 'normal' Delphi debugging. I think I have all of the necessary debug options set (the debugger certainly works as expected when I build the code for Win32/Win64). Specifically this was a working 32 bit application and DLL that I have converted to a macOS app and DYLIB. I can get the DYLIB to load and functions called if I have a simple test application as the host NOT the converted application. The reason it is now quite desperate is that I'm getting an AV and here's the scenario: Delphi 10.2.3 OSX 10.13.6 PAServer 19.0 Xcode 9.4.1 So my issue with code: Main Program and My Dylib Both call a common unit that generates log file (log4pascal as modified by me) At startup I get Log.d message that now in Initialize Block of log4pascal (it sets up logging for the DYLIB and main application) I then get a Log.d message code is in the Initialize Block of the DYLIB I then get a log.d message that code is leaving the Initialize Block of the DYLIB (all good so far) I SHOULD now get a log.D message that it is entering the Initialize Block of the Unit associated with the main application Instead I get an AV - see attached OSX AV And the PASERVER log shows the same - See log-lines below So the Initialize Block code for the main unit for the application itself is a Log.d line, it NEVER gets executed, ie. the AV occurs before it gets to Initialize? I am having significant difficulty tracking this error. So my initial problem is essentially ...how do i get the debugger to work when running an OSX application so that I can track down that AV (ie. with features like setting breakpoints and single stepping through the code??? Or do I have this all wrong, is there some other way I should be doing it (the Embarcadero documentation suggests I should be able to debug OSX in the same way as I debug Win32 apps). Again, if this is simple stuff I apologies, but it has me stuck.... Kevin