edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [edbrowse-dev] local version of website
@ 2019-06-01 11:53 Karl Dahlke
  0 siblings, 0 replies; only message in thread
From: Karl Dahlke @ 2019-06-01 11:53 UTC (permalink / raw)
  To: edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 1933 bytes --]

It is not easy to figure out what is wrong with edbrowse js in the real world.
I always seem to need a local copy of the website, with all its js files, deminimized, and css files too, so I can put in debug prints, and breakpoints, etc.
That task alone use to take hours.
I'm trying to streamline it with a snapshot() function.
You call it from within jdb.
Let's use nasa as the quintessential example,
an incredibly complicated website just to disseminate information.

1. make a directory somewhere called nasa and cd into it.
This directory is empty.

2. Call up edbrowse and set demin for deminimization, and db3 if you want to see what is going on.
b https://www.nasa.gov

3. Verify you have about 180 lines, you got real stuff. Try to ignore the errors for now.

4. jump into jdb and run snapshot().

5. Use . to exit out of jdb, then ub to unbrowse.
1r from
This sets the base tag.
w base
Save the home page to a local file.
qt
We're done here.

6. ls to see what has happened.

7. edbrowse the base file, just a local file.
db3 to see what is happening, and b to browse.
Almost all of the javascript files, and certainly the ones we care about, are fetched locally from your directory.
Also the css files, though I don't have this working for @import yet.
You should get the same errors, and the same 180 lines of stuff.

8. You can change the js files, add alert statements, breakpoints, etc, and browse and change and browse again, and otherwise debug.

This should support nontrivial debugging.
You don't need a local web server to do this, which I needed in the past.

For ongoing work, change the filenames to be more intuitive.
Perhaps f2.js is vendor.js and f3.js is nasa.js.
Just make the same change in the jslocal map.
Maybe I can improve the software to come up with better filenames.

There's more work to do here so send along patches and suggestions.

Karl Dahlke

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-01 12:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-01 11:53 [edbrowse-dev] local version of website Karl Dahlke

edbrowse-dev - development list for edbrowse

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/edbrowse-dev

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 edbrowse-dev edbrowse-dev/ http://inbox.vuxu.org/edbrowse-dev \
		edbrowse-dev@edbrowse.org
	public-inbox-index edbrowse-dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.edbrowse.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git