1

I have this simple code:

module Main where
import Debug
import Html exposing (Html,text,select)
import Html.Attributes exposing (id)
import StartApp.Simple as StartApp
main : Signal Html
main=
    StartApp.start {model=0,update=update,view=view}
type Action=
    Noop
update : Action -> Int -> Int
update a i =
    case a of
        Noop -> i
view : Signal.Address Action -> Int -> Html
view a i=
    select [id "list"] (Debug.watch "options" viewoptions)

options : List String
options=["ahmad","batoul","hello"]
viewoptions : List Html
viewoptions=
    List.map text options

I need to see the value of viewoptions , when I launch elm-reactor and go to 0.0.0.0:8000, I go to my file(main.elm) and press the wrench , after that I get "No watches found" and suggests me to use Debug.watch or Debug.watchsumary.

I looked in the examples in this page and they work, So why doesn't mine ?

niceman
  • 2,653
  • 29
  • 57

1 Answers1

1

At the moment, there are open bugs with elm-reactor when dealing with ports which make debug watching with StartApp fail. There is an open issue here.

Chad Gilbert
  • 36,115
  • 4
  • 89
  • 97