{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/6534","repository_url":"https://api.github.com/repos/kripken/emscripten","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/6534/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/6534/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/6534/events","html_url":"https://github.com/kripken/emscripten/issues/6534","id":323282796,"number":6534,"title":"SAFE_HEAP=1 breaks source map generation for WASM","user":{"login":"newnon","id":5040118,"avatar_url":"https://avatars1.githubusercontent.com/u/5040118?v=4","gravatar_id":"","url":"https://api.github.com/users/newnon","html_url":"https://github.com/newnon","followers_url":"https://api.github.com/users/newnon/followers","following_url":"https://api.github.com/users/newnon/following{/other_user}","gists_url":"https://api.github.com/users/newnon/gists{/gist_id}","starred_url":"https://api.github.com/users/newnon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newnon/subscriptions","organizations_url":"https://api.github.com/users/newnon/orgs","repos_url":"https://api.github.com/users/newnon/repos","events_url":"https://api.github.com/users/newnon/events{/privacy}","received_events_url":"https://api.github.com/users/newnon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-15T16:00:34Z","updated_at":"2018-05-15T20:44:10Z","closed_at":null,"author_association":"NONE","body":"CMakeLists.txt\r\n```\r\ncmake_minimum_required(VERSION 2.8)\r\n\r\nproject(cpp_with_emscripten_val)\r\n\r\nset(CMAKE_CXX_STANDARD 11)\r\nset(CMAKE_CXX_STANDARD_REQUIRED ON)\r\n\r\nset(CMAKE_EXECUTABLE_SUFFIX \".html\")\r\n\r\nset(EMSCRIPTEN_FLAGS \" -s WASM=1\")\r\nset(CMAKE_C_FLAGS             \"${CMAKE_C_FLAGS} ${EMSCRIPTEN_FLAGS}\")\r\nset(CMAKE_CXX_FLAGS           \"${CMAKE_CXX_FLAGS} ${EMSCRIPTEN_FLAGS}\")\r\nset(CMAKE_EXE_LINKER_FLAGS    \"${CMAKE_EXE_LINKER_FLAGS} ${EMSCRIPTEN_FLAGS}\")\r\n\r\nset(EMSCRIPTEN_FLAGS_DEBUG \"-g4\")\r\n#set(EMSCRIPTEN_FLAGS_DEBUG \"-g4 SAFE_HEAP=1\")\r\nset(CMAKE_C_FLAGS_DEBUG \"${CMAKE_C_FLAGS_DEBUG} ${EMSCRIPTEN_FLAGS_DEBUG}\")\r\nset(CMAKE_CXX_FLAGS_DEBUG \"${CMAKE_CXX_FLAGS_DEBUG}  ${EMSCRIPTEN_FLAGS_DEBUG}\")\r\nset(CMAKE_EXE_LINKER_FLAGS_DEBUG \"${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${EMSCRIPTEN_FLAGS_DEBUG} --source-map-base http://localhost:6931/\")\r\n\r\nadd_executable(cpp_with_emscripten_val main.cpp)\r\n```\r\n\r\nmain.cpp\r\n```\r\n#include <stdio.h>\r\n\r\nint main()\r\n{\r\n\tint test_int = 5;\r\n\tprintf(\"Hello! test int: %d, __cplusplus: %ld\\n\", test_int, __cplusplus);\r\n}\r\n```\r\nfinally emrun you code place main.cpp where browser will search it(or just edit 1 line in .map file)\r\nand try to set break point with Firefox developer edition everything will work good\r\nthen uncomment string SAFE_HEAP=1 and recompile break point not work now"},"comment":{"url":"https://api.github.com/repos/kripken/emscripten/issues/comments/389307085","html_url":"https://github.com/kripken/emscripten/issues/6534#issuecomment-389307085","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/6534","id":389307085,"user":{"login":"kripken","id":173661,"avatar_url":"https://avatars0.githubusercontent.com/u/173661?v=4","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"created_at":"2018-05-15T20:44:10Z","updated_at":"2018-05-15T20:44:10Z","author_association":"OWNER","body":"I think this is the same as #4224. Basically SAFE_HEAP uses the js optimizer, and optimizing the JS messes up source maps currently."}}
{"actor":{"display_login":"kripken"}}