Sha256: 7023b291ea62989e54dc796cc4a0ae438958c7455d86306ab91591ecbdab5d14

Contents?: true

Size: 687 Bytes

Versions: 9

Compression:

Stored size: 687 Bytes

Contents

# Debugging Ovto app

## console.log

In an Ovto app, you can print any object to developer console by `console.log`
like in JavaScript. 

```rb
console.log(state: State.new)
```

This is mostly equal to `p state: State.new` but `console.log` supports
JavaScript objects too.

(Note: this is not an official feature of Opal. You can do this setup by this:)

```rb
  require 'console'; def console; $console; end
```

## ovto-debug

If the page has a tag with `id='ovto-debug'`, exception is shown in the tag.

## Ovto.debug_trace

If `Ovto.debug_trace` is set to `true`, some diagnostic messages are shown in the browser console.

```rb
Ovto.debug_trace = true
MyApp.run(id: 'ovto')
```

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ovto-0.7.0 book/guides/debugging.md
ovto-0.6.2 book/guides/debugging.md
ovto-0.6.1 book/guides/debugging.md
ovto-0.6.0 book/guides/debugging.md
ovto-0.6.0.rc1 book/guides/debugging.md
ovto-0.5.0 book/guides/debugging.md
ovto-0.4.1 book/guides/debugging.md
ovto-0.4.0 book/guides/debugging.md
ovto-0.3.0 book/guides/debugging.md