Recent

Author Topic: How to debug fphttpclient?  (Read 901 times)

lainz

  • Hero Member
  • *****
  • Posts: 2923
    • Home
How to debug fphttpclient?
« on: May 12, 2018, 09:47:20 pm »
Hi, this unit is from FPC, so to debug that I need to recompile FPC, or do something special?

What I need to figure is why fphttpclient doesn't get the response from a fiscal printer emulator (localhost), because with wireshark we noticed that the emulator sends the response, but fphttpclient never get's it.

GetMem

  • Hero Member
  • *****
  • Posts: 3261
Re: How to debug fphttpclient?
« Reply #1 on: May 12, 2018, 09:51:09 pm »
You have to rebuild FPC with -g -gl -O- . If you install lazarus with fpcupdeluxe...see attached image. Another solution is to copy the appropriate unit to your project folder.
« Last Edit: May 12, 2018, 09:52:48 pm by GetMem »

lainz

  • Hero Member
  • *****
  • Posts: 2923
    • Home
Re: How to debug fphttpclient?
« Reply #2 on: May 12, 2018, 09:57:48 pm »
Thanks. Yes, I use fpcupdeluxe. I will try.

lainz

  • Hero Member
  • *****
  • Posts: 2923
    • Home
Re: How to debug fphttpclient?
« Reply #3 on: May 12, 2018, 10:50:07 pm »
Well, it went bad  :'(

I need to reinstall everything, now I can't compile anymore. "File not open" error.

But the good part is that I need to clean only the SVN directories, run fpcupdeluxe, and everything will work again.

engkin

  • Hero Member
  • *****
  • Posts: 2138
Re: How to debug fphttpclient?
« Reply #4 on: May 12, 2018, 11:35:52 pm »
Hi, this unit is from FPC, so to debug that I need to recompile FPC, or do something special?

Simply copy the folder that includes fphttpclient, add its path to your test project. Debug your project as usual.

This should work for debugging TFPHTTPClient class.

lainz

  • Hero Member
  • *****
  • Posts: 2923
    • Home
Re: How to debug fphttpclient?
« Reply #5 on: May 12, 2018, 11:39:14 pm »
Thanks. Yes, in fact I found that a recent commit on SVN, a writeln on the IDE, break's the build of projects / rebuild of the IDE.

But I've reported that.

And well, I will do that better, copy the file / folder as you and getmem suggested, so I don't need to rebuild everything again, to debug fphttpclient.