1.0.2 • Published 4 years ago

web-debug-box v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

web-debug-box

A draggable float window for dev to debug (especially for mobile)

Sometimes you need to show html on your mobile, and you want to see the runtime JavaScript variable. This box will help you to show the data.

usage

  • install
    • yarn add web-debug-box --dev
    • OR npm install web-debug-box --save-dev
  • init
        import WebDebugBox from 'web-debug-box'
        // after the body loaded
        WebDebugBox.init()
  • show data on the box to debug
    ```
        const data = {
            name: 'Mark',
            age: 20
        }
        WebDebugBox.showData(data)
    ```
    DONE !

Set Style

you can also set style or set class for the box

```
    // set style
    WebDebugBox.setStyle({
      'width': '90vw',
      'height': '50vh',
      'left': '20px'
    })
    // set class
    WebDebugBox.setClass('class1 class2 ...')
```

Note that this box has a absolute position to the body of html

Draggable

You can drag the box to the suitable place during debugging

Example

example

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1

4 years ago