I am trying to use --preload-file. The build concludes successfully but
the app is failing to load the files. There are no messages in the
browser or web consoles, except "preload time: XXXms" which seems to
indicate successful preloading.

I attempted to debug the js but found major flaws in all the available
debuggers which I'll list below. I did manage to observe the parameter
being passed to fopen. It was a decimal number. How can I find out if
that corresponds to the intended filename string?

Another issue is lack of documentation about how --preload-file handles
paths. I eventually looked at tests/hello_world_files.cpp which shows
passing a relative path to --preload-file and passing the same relative
path to fopen. That is what I am doing.

I tried to view FS.readFiles but the debugger said it is undefined.

Debugger issues:

  * Firefox/built-in debugger showed original C source code and let me
    set breakpoints but
      o it didn't always stop at the breakpoints.
      o when it did and I stepped through the code it jumped wildly
        around the code.
      o when I finally got it to stop at the first line of a function,
        it told me the function's parameter was "undefined" which is
        unlikely given that the code at the call site sets it to a
        hardcoded number.
  * Firefox/Firebug's code search and source browser is completely
    useless so I was unable to find the places I want to set
    breakpoints. I think the problem is related to the length of the
    source file. After I enter the text for which I want to search, the
    source browser pane goes blank. If I click an up or down arrow
    source code appears but it does not contain the text I was looking
    for. It may be that the desired text is nearby but scrolling is
    unusable. Each arrow click moves the code too far, so I can't
    conform that.
  * Chrome. When I set a breakpoint in the Javascript code, the
    breakpoints menu shows what appears to be the correct C source code
    line but completely different Javascript from the line where I set
    the breakpoint. After turning off JS maps, I got the breakpoint in
    the right place which is at the caller of the function for loading a
    file. However when I attempt to step into the function Chrome acts
    as if I had clicked the continue button.

How are you supposed to debug this stuff? Skid marks?

Regards

    -Mark

-- 
注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合
が有ります。正式なメール受信者では無い場合はメール複製、 再配信または情
報の使用を固く禁じております。エラー、手違いでこのメールを受け取られまし
たら削除を行い配信者にご連絡をお願いいたし ます.

NOTE: This electronic mail message may contain confidential and
privileged information from HI Corporation. If you are not the intended
recipient, any disclosure, photocopying, distribution or use of the
contents of the received information is prohibited. If you have received
this e-mail in error, please notify the sender immediately and
permanently delete this message and all related copies.

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to