Hmm, indeed. It works immediately when the source files are in the same directory as the build result. It even automatically lists the .c file...
I can't get it to work with "out-of-source builds" yet. I figured out that I need to tell Chrome the source code directory via "Filesystem -> Add to workspace...", and then I can open the source files with Ctrl-P, but it doesn't recognize the breakpoints (I can set them, but they're not hit). I'll do some more experiments. Maybe the source file isn't properly matched with the 'reference' from the WASM file. Cheers! On Wednesday, 3 April 2019 22:51:35 UTC+2, Alon Zakai wrote: > > The Ctrl+P stuff is new, but it should work. For example, > > ./emcc tests/hello_world.c -g4 -o a.html > python -m SimpleHTTPServer > browse to localhost:8000/a.html in chrome > go to sources, ctrl-p, pick hello_world.c > > Then it shows up, breakpoints work, etc. > > > On Sat, Mar 30, 2019 at 10:38 PM <[email protected] <javascript:>> > wrote: > >> Also, sorry, I should clarify, I have set the compiler options as >> instructed on that page, in Chrome I get errors, but no C++ source code. >> In the sources tree, no C++ files appear. There's a message: "Source map >> detected. Associated files should be added to the file tree. You can >> debug these resolved source files as regular JavaScript files. Associated >> files are available via file tree or Ctrl + P" >> >> Ctrl + P doesn't bring up any C++ files, I'm not sure what to do. >> >> Thanks so much >> >> -- >> 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] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- 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/d/optout.
