Faster workflow for debugging Thunderbird?

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

Faster workflow for debugging Thunderbird?

max1858well
Hello to all!
I'm using remote debugging in Firefox to debug Thunderbird.
I"m trying to debug an addon which I'd like to modify, but it's quite tedious:

Here's my workflow:
1) Modify the code of the Thunderbird addon
2) Launch Thunderbird
3) in Firefox, do "tools" > "web developer" > "connect"
4) click on "ok" to confirm "incoming connection" in  Thunderbird popup window
5) in Firefox, choose "main process"
and here I can finally see my console and what's going on with the mod that I've coded.

and each time I'm doing some modification in the code, I restart Thunderbird, the connection from Firefox is lost and the web developer window closed. So for every modification I need to do all the steps from #2.

Are you all coding like this?
Thanks a lot for your help!
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Faster workflow for debugging Thunderbird?

Philipp Kewisch-2
On 11/11/16 11:47 AM, Jack Maxwell wrote:

> Hello to all!
> I'm using remote debugging in Firefox to debug Thunderbird.
> I"m trying to debug an addon which I'd like to modify, but it's quite tedious:
>
> Here's my workflow:
> 1) Modify the code of the Thunderbird addon
> 2) Launch Thunderbird
> 3) in Firefox, do "tools" > "web developer" > "connect"
> 4) click on "ok" to confirm "incoming connection" in  Thunderbird popup window
> 5) in Firefox, choose "main process"
> and here I can finally see my console and what's going on with the mod that I've coded.
>
> and each time I'm doing some modification in the code, I restart Thunderbird, the connection from Firefox is lost and the web developer window closed. So for every modification I need to do all the steps from #2.
>
> Are you all coding like this?
> Thanks a lot for your help!
>

Unfortunately this is the way to go for now, until bug 1279834 is fixed.
I just uploaded a new patch so we can get this in for 52. You can drop
step 4 by setting:

devtools.debugger.force-local = true
devtools.debugger.prompt-connection = false

Philipp
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Faster workflow for debugging Thunderbird?

aleth
In reply to this post by max1858well
Making your addon restartless can help.

Also, this:
https://developer.mozilla.org/en-US/Add-ons/Setting_up_extension_development_environment#Firefox_extension_proxy_file
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Faster workflow for debugging Thunderbird?

aleth
How much work it is to go restartless very much depends on what's
changed by the overlay, so it's worth taking a look. There are also
things which are easier to do in restartless extensions.

On Fri, Nov 11, 2016, at 03:12 PM, Jörg Knobloch wrote:

> On 11/11/2016 13:58, [hidden email] wrote:
> > Making your addon restartless can help.
>
> That's wishful thinking in most cases. Either you start designing the
> add-on restartless or you will never convert it.
>
> Most add-ons override standard stuff, so they will never be restartless.
>
> Jörg.
>
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Faster workflow for debugging Thunderbird?

Tito-12
In reply to this post by Philipp Kewisch-2
On 11/11/2016 01:50 PM, Philipp Kewisch wrote:

> On 11/11/16 11:47 AM, Jack Maxwell wrote:
>> Hello to all!
>> I'm using remote debugging in Firefox to debug Thunderbird.
>> I"m trying to debug an addon which I'd like to modify, but it's quite tedious:
>>
>> Here's my workflow:
>> 1) Modify the code of the Thunderbird addon
>> 2) Launch Thunderbird
>> 3) in Firefox, do "tools" > "web developer" > "connect"
>> 4) click on "ok" to confirm "incoming connection" in  Thunderbird popup window
>> 5) in Firefox, choose "main process"
>> and here I can finally see my console and what's going on with the mod that I've coded.
>>
>> and each time I'm doing some modification in the code, I restart Thunderbird, the connection from Firefox is lost and the web developer window closed. So for every modification I need to do all the steps from #2.
>>

Many are coding like this, and unfortunately i do not know any better
way. Except building your java script code in a mouduler architecture
and writing tests for them and then just using them in Thunderbird,
maybe this is a better approach. Many frameworks use the so called
module pattern (Stoyan Stefanov - JavaScript Patterns 2010 page 97). If
your code pass in chrome it will also pass in firefox/thunderbird thus
no need to restart. Then you just polish the app.


>> Are you all coding like this?
>> Thanks a lot for your help!
>>
>
> Unfortunately this is the way to go for now, until bug 1279834 is fixed.
> I just uploaded a new patch so we can get this in for 52. You can drop
> step 4 by setting:
>
> devtools.debugger.force-local = true
> devtools.debugger.prompt-connection = false


Nice Philipp ,, really nice, Many thanks for your work on the debugger.
By the way also great articles on the remote debugging part.
>
> Philipp
>

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Loading...