Faster debugging of browser's internal JavaScript

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Faster debugging of browser's internal JavaScript

Unread post by adesh » 2020-10-22, 09:10

Currently, I've to do ./mach build to get the changes to reflect in the browser. This takes almost 2 minutes on my system. I test something in the browser, spend a few seconds modifying the code further, and again I've to wait 2 minutes to see the changes in the browser.

Is there a way to speed up the process?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35477
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Faster debugging of browser's internal JavaScript

Unread post by Moonchild » 2020-10-22, 09:40

You can edit the browser's JS in your objdir's dist/bin and do a mach run after that to relaunch the browser (potentially with -purgecaches). Disadvantage is of course that any changes you make aren't tracked and you'll have to manually make the same changes again in the source tree, which is a risky process and easy to make mistakes in. Don't try to shortcut it by copying js from the objdir back to source either because you cant do that due to preprocessing of most files.
I suggest you only do this for very small changes; otherwise just be patient, make as many changes as you can in one go and deal with the mach build wait.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

New Tobin Paradigm

Re: Faster debugging of browser's internal JavaScript

Unread post by New Tobin Paradigm » 2020-10-22, 09:47

Two minutes is better than a full rebuild every time ;)

I have come to enjoy those two minutes. Gives me a chance to take a drink of water or soda or take a hit off my vape. Speed isn't everything!

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: Faster debugging of browser's internal JavaScript

Unread post by adesh » 2020-10-22, 09:59

Good to know. Thanks!
I'll try to improve myself to make lesser passes and probably relax in between.
Off-topic:
New Tobin Paradigm wrote:
2020-10-22, 09:47
Speed isn't everything!
As someone said: There is more to life than speed.

The Squash

Re: Faster debugging of browser's internal JavaScript

Unread post by The Squash » 2020-10-22, 16:34

Easy -- just upgrade to better hardware! :lol:

New Tobin Paradigm

Re: Faster debugging of browser's internal JavaScript

Unread post by New Tobin Paradigm » 2020-10-22, 16:37

So you come to sour another thread with fake sarcasm?

The Squash

Re: Faster debugging of browser's internal JavaScript

Unread post by The Squash » 2020-10-22, 22:08

  • WHEREAS, It's not fake sarcasm at all -- just because I put an emoticon within the jest tag doesn't mean it's fake humor; and
  • WHEREAS, the thread is over with, so who cares anyway; and
  • WHEREAS, if you continue this thread any longer on this subject then, quite frankly, the blame's really on you for souring this thread, because nobody else would even bother to berate me about something as totally innocuous as what I said; and
  • WHEREAS, plus, what I said is what most established computer professionals would say! :D
NOW THEREFORE, if we could please kill the conversation right here, that would be productive. Thank you.

User avatar
Admin
Site Admin
Site Admin
Posts: 405
Joined: 2012-05-17, 19:06

Re: Faster debugging of browser's internal JavaScript

Unread post by Admin » 2020-10-23, 13:25

All right, @Squash that's quite enough. Go cool your heels for a few days and come up with actual meaningful posts when you get back.
Did you know that moral outrage triggers the pleasure centers of the brain? It's unlikely you can actually get addicted to outrage, but there is plausible evidence that you can become strongly predisposed to it.
Source: https://www.bbc.co.uk/programmes/p002w557/episodes/downloads - "The cooperative species" and "Behaving better online"
Image

Locked