Git Product home page Git Product logo

webkit-inspector-tfo-uigt's Introduction

WebKit inspector that works with UIGT. Bundling scripts that are meant to bundle this thing into a single js and css file rather than shipping 500+ files.

Usage

Prerequisites

You have to use a recent WebKit-based browser to load devtools:

Note: using Chromium or another browser for this is a bad idea (the devtools will work, but will be very glitched as they use many WebKit-specific unstandardised features).

Debugging the in-game views

We already bundle the built devtools inspector with our game package, you do not need anything from this repo to proceed!

You can enable CoherentUIGT devtools in game with -uigtdevtools command line option (optionally change port with -uigtdevtoolsport, default 19999).

Then, once the game starts up, simply navigate to http://127.0.0.1:19999 (in one of the WebKit-based browsers mentioned above) in order to see the list of pages possible to debug at the time.

Playwright browser screenshot


Instructions below are for updating the bundled inspector. You don't normally need to follow them unless an update to devtools bundle is needed.

Building

If you want to update the bundled inspector in dist/, just do npm install, npm install --global gulp-cli and then run gulp. The contents of dist/ folder go into ./package/Data/inspector folder on the package repo.

About

These devtools come from Safari's WebKit project and this particular bundle appears to be modified by Coherent to support CoherentUIGT 2.x. In this repo we make a few adjustments to make it work better with CoherentUIGT 1.x, and also bundle everything from 500+ files into just 4, using some further code changes to ensure all images are bundled properly.

Changes we made:

  • bundled all assets into a single JS and CSS with gulp scripts
  • replaced the way svg symbols are created from an <svg> with <use> inside of it to <img> tag with content:url() style, which seems to support data: URIs better
  • force the inspector to use backend commands script for legacy Safari 7.0, which seems to work much better with our CoherentUIGT 1.x (trying to copy 6.0 one from older devtools did not work however)
  • fix typos in a few image references so that they load properly again

Overall the devtools work propely and in the interface everything besides "start element selection" feature works, however there are still ocassional console errors about minor incompatibilities, for example:

[Error] ReferenceError: Can't find variable: HeapAgent
	navigationItems (main.js:23874)
	_updateContentViewNavigationItems (main.js:14625:221)
	_currentContentViewDidChange (main.js:14646:297)
	dispatch (main.js:8738:149)
	dispatchEventToListeners (main.js:8740)
	showBackForwardEntryForIndex (main.js:20853)
	showContentView (main.js:20847)
	(anonymous function) (main.js:32368:118)
	(anonymous function) (main.js:32277)
	(anonymous function)
[Error] Missing handling of Timeline Event Type: ParseHTML
	_processRecord (main.js:32027:1412)
	eventRecorded (main.js:31991:267)
	eventRecorded (main.js:10165)
	dispatchEvent (main.js:9587)
	_dispatchEvent (main.js:9653:124)
	dispatch (main.js:9622)
	dispatch (main.js:9543)
	(anonymous function) (main.js:8618:106)

While not breaking, they could be looked into and attempted to be fixed at some point. Assuming they weren't some upstream pre-existing hidden bugs in the first place...

webkit-inspector-tfo-uigt's People

Contributors

p0358 avatar

Watchers

talk show ghost avatar  avatar James Michael Vevers Hill avatar  avatar Александр Герман avatar Maya avatar Yan avatar Krzysztof Świeczkowski avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.