embedding with debugging support

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

embedding with debugging support

Cristian Tarsoaga-2
Hello,

My name is Chris and I would like to embed Mozilla into a C++ app.
I have managed to do this, but I need to have some debugging support (for html, javascript).

The only way I know of, is to try to embed some extensions like venkman/dom inspector.

The documentation I found for this seems old/confusing. I was not able to embed these after reading this link:
https://developer.mozilla.org/en/XULRunner_tips

Is there any other information available?

Note: I do not use a xul app and I am also not familiar with xul. So far, all I need is a webbrowser window in which I could click and say 'Inspect DOM, debug
javascript....", something like this.

  Thanks a lot
      Chris
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: embedding with debugging support

Gijs Kruitbosch ("Hannibal")
Cristian Tarsoaga wrote:

> Hello,
>
> My name is Chris and I would like to embed Mozilla into a C++ app.
> I have managed to do this, but I need to have some debugging support (for html, javascript).
>
> The only way I know of, is to try to embed some extensions like venkman/dom inspector.
>
> The documentation I found for this seems old/confusing. I was not able to embed these after reading this link:
> https://developer.mozilla.org/en/XULRunner_tips
>
> Is there any other information available?
>
> Note: I do not use a xul app and I am also not familiar with xul. So far, all I need is a webbrowser window in which I could click and say 'Inspect DOM, debug
> javascript....", something like this.
>
>   Thanks a lot
>       Chris

Hi Chris,

Both Venkman and DOMI are XUL applications. Using either will require some sort
of XUL support. I myself am not familiar with embedding, so can't give you much
advice there... How are you embedding Mozilla in your C++ app? And what
platforms are you running this on?

~ Gijs
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: embedding with debugging support

Cristian Tarsoaga-2
Hi Gijs,


I have used these docs: https://wiki.mozilla.org/Embedding/NewApi/Win32 to start.
I downloaded xulrunner sources (from here: http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.9.1/source/) and built them.


I am using a slightly modified version of the simple demo app that comes with the xulrunner source tree inside the embedding/tests/winEmbed folder (it runs on Windows)
My xulrunner build includes also dom inspector and venkman as extensions.
(there are some compile time flags that may be used in .mozconfig to determine whether these will be included in the resulting build)

I have full XUL support and Javascript support in that test application. I was able to open some XUL samples or html pages using javascript with no problems.
I just mentioned that I do not have any XUL experience myself, hoping that when/if someone replies will give me all the details needed to setup anything that involves a XUL
application :-)


In the end, I was able to start venkman by loading this url from within the demo application: chrome://venkman/content
[source: old message from this forum, see http://osdir.com/ml/mozilla.devel.jsdebugger/2002-04/msg00000.html]

But it does not run properly: I was not able to open any http/file url
I could also not open DOM Inspector at all...


   thanks :-)
      Chris

Gijs Kruitbosch wrote:

> Cristian Tarsoaga wrote:
>> Hello,
>>
>> My name is Chris and I would like to embed Mozilla into a C++ app.
>> I have managed to do this, but I need to have some debugging support
>> (for html, javascript).
>>
>> The only way I know of, is to try to embed some extensions like
>> venkman/dom inspector.
>>
>> The documentation I found for this seems old/confusing. I was not able
>> to embed these after reading this link:
>> https://developer.mozilla.org/en/XULRunner_tips
>>
>> Is there any other information available?
>>
>> Note: I do not use a xul app and I am also not familiar with xul. So
>> far, all I need is a webbrowser window in which I could click and say
>> 'Inspect DOM, debug
>> javascript....", something like this.
>>
>>   Thanks a lot
>>       Chris
>
> Hi Chris,
>
> Both Venkman and DOMI are XUL applications. Using either will require
> some sort of XUL support. I myself am not familiar with embedding, so
> can't give you much advice there... How are you embedding Mozilla in
> your C++ app? And what platforms are you running this on?
>
> ~ Gijs
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: embedding with debugging support

Gijs Kruitbosch ("Hannibal")
Cristian Tarsoaga wrote:
> In the end, I was able to start venkman by loading this url from within the demo application: chrome://venkman/content
> [source: old message from this forum, see http://osdir.com/ml/mozilla.devel.jsdebugger/2002-04/msg00000.html]
>
> But it does not run properly: I was not able to open any http/file url
> I could also not open DOM Inspector at all...
>

Did you make the change suggested in that article, too? If not, that would be
why it didn't "work", presumably. However, you would not want to load web
content in the same browser element, in that case (because it will be privileged
and be able to do whatever to your computer)... :-\

~ Gijs
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: embedding with debugging support

Cristian Tarsoaga-2
No, I didn't do it for two reasons:
1 - that code is not present anymore inside that sample
2 - it seems that such code was needed to enable chrome:// support, but the current sample has this support by default
(I am able to open a simple chrome/XUL example app with no problems)
...so I guess that I don't need that change.

I am not aware of any security issues involved if opening venkman in the same window. But I wouldn't even mind to have such problems :-).
My intention is to only have it in a debug version of my c++ app so that the developers can track any html/js issues.

I'd be very happy to just see the venkman opened and running :-)

I just found some more information here https://developer.mozilla.org/en/Debugging_a_XULRunner_Application
But I have to understand how to configure a xul app to try that...

  Thanks Gijs,
    Chris

Gijs Kruitbosch wrote:

> Cristian Tarsoaga wrote:
>> In the end, I was able to start venkman by loading this url from
>> within the demo application: chrome://venkman/content
>> [source: old message from this forum, see
>> http://osdir.com/ml/mozilla.devel.jsdebugger/2002-04/msg00000.html]
>>
>> But it does not run properly: I was not able to open any http/file url
>> I could also not open DOM Inspector at all...
>>
>
> Did you make the change suggested in that article, too? If not, that
> would be why it didn't "work", presumably. However, you would not want
> to load web content in the same browser element, in that case (because
> it will be privileged and be able to do whatever to your computer)... :-\
>
> ~ Gijs
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger