Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

JSExtensionWithFunction with multi process not working

Post Reply
dinko
Posts: 15
Joined: Mon Jan 28, 2019 8:44 am

JSExtensionWithFunction with multi process not working

Post by dinko »

I've take code from JSExtensionWithFunction and I have successfully created a project that get JS commands from html page.
It works perfect but only if SingleProcess = true. When the SingleProcess = false the Chromium1ProcessMessageReceived never receives any message.

Any idea?
dinko
Posts: 15
Joined: Mon Jan 28, 2019 8:44 am

Re: JSExtensionWithFunction with multi process not working

Post by dinko »

Small correction:

I JSRTTIExtension example not JSExtensionWithFunction.
User avatar
salvadordf
Posts: 4572
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: JSExtensionWithFunction with multi process not working

Post by salvadordf »

Hi,

I just tested the JSRTTIExtension demo in the latest CEF4Delphi version available at GitHub with Delphi 10.3.3 and it works correctly.

The single process mode is not supported and may cause unexpected issues. Use it only for debugging purposes.
dinko
Posts: 15
Joined: Mon Jan 28, 2019 8:44 am

Re: JSExtensionWithFunction with multi process not working

Post by dinko »

That's what I am telling

Single process: works properly
Multi process: not working

So I can't rely on Single process.
I would try with latest version and let you know asap.
User avatar
salvadordf
Posts: 4572
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: JSExtensionWithFunction with multi process not working

Post by salvadordf »

I forgot to add that Delphi can only debug one process and any breakpoint set while debugging the main browser process will not seem to work if it's set on a procedure that it's only executed in the render process.

In reality, it is executed but Delphi is debugging a different process.
dinko
Posts: 15
Joined: Mon Jan 28, 2019 8:44 am

Re: JSExtensionWithFunction with multi process not working

Post by dinko »

You mean while you have "Integrated debugger" set to on, right?
Because I am trying with debugger off using build platform Release and, still doesnt work.
Didnt tried the latest version yet.
User avatar
salvadordf
Posts: 4572
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: JSExtensionWithFunction with multi process not working

Post by salvadordf »

Yes, you need to build the demo with the Debug configuration and also run with the integrated debugger (F9).

The JSRTTIExtension demo is a slightly less complicated version of the JSExtension demo that uses RTTI.

Please, try the JSExtension demo in the latest CEF4Delphi version and read this for more details about debugging and how to make JavaScript extensions work :
https://www.briskbard.com/index.php?lan ... #debugging
https://www.briskbard.com/forum/viewtop ... 4084#p4084
Post Reply