-
-
Notifications
You must be signed in to change notification settings - Fork 31
Dev: Wasm Debug
It is possible, using the latest Chrome Canary, to set breakpoints and view runtime scoped C++ variables from Conway-Geom while debugging via Share.
-
Install Chrome Canary
-
Install C++ Devtools Support (Restart Chrome Canary after installation)
-
Clone conway, conway-web-ifc-adapter, and share
-
Install dependencies for the above and build.
We can link local packages to share, so when we make a change in conway (or specifically conway-geom) and build share, we can set breakpoints and view runtime variable values in our C++ source.
yarn link
basically advertises that the package listed in package.json is available locally, for any other package that wants to use it, and a corresponding yarn link <that package>
will then use it instead of downloading.
- From the conway root:
yarn link
yarn build
yarn build-profile-conway_geom-web
- From the conway-web-ifc-adapter root:
yarn link @bldrs-ai/conway
yarn build
yarn link
- From share root:
yarn link @bldrs-ai/conway-web-ifc-adapter
yarn build-conway-debug
yarn serve
Now that the packages are linked, navigate to share in Chrome Canary and open developer tools. From there, you can find the wasm C++ source files you want to debug, set break points, and view runtime variables.
You can run yarn unlink
in the conway and conway-web-ifc-adapter repos when you are finished to point back to the installed npm packages in share.