How To Debug HTML Packaging / Emcc Compiling?

How do you enable debugging features of emcc during HTML packaging?

http://kripken.github.io/emscripten-site/docs/porting/Debugging.html

Hi ,

The flags you want to set up are located in the file \Unreal Projects\PROJECTNAME\Source\Programs\UnrealBuildTool\HTML5\HTML5ToolChain.cs

Specifically, you will be interested in are:

EMCC_DEBU1

  • Shows full commandline used in the output window

SAFE_HEAP=1

  • this should rarely be used, it will make the game run slowly

Something to note: there is no way the javascript code can be made available uncompressed. The file is so large that it would cripple your browsers memory. No browser will be able to display the code (even compressed) in the debugger window. It is recommended that you debug the code in the C++ executable. When the game in browser crashes, you can get a stack dump to narrow the location of the problem function in C++, but inevitably you need to go through the C++ file to find the exact problem.

Thanks, just what I needed!

(in case anyone wonders, I had weird things happening, like booleans having a value of 191, it was caused by using a dereferenced pointer after I had removed the pointer from a TMap)