-
-
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.
![Screenshot 2024-10-15 at 3 11 17 PM](https://private-user-images.githubusercontent.com/17447690/376757846-c92848f2-b487-413c-b07b-0fddf07fe75b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMDk4ODYsIm5iZiI6MTczOTEwOTU4NiwicGF0aCI6Ii8xNzQ0NzY5MC8zNzY3NTc4NDYtYzkyODQ4ZjItYjQ4Ny00MTNjLWIwN2ItMGZkZGYwN2ZlNzViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDEzNTk0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE3ZjQ5YmM0N2FmMDliMDlhNGFhYTM0OGJlNjNhYjgzYjRmOTAyYTY5MmVkMWJjOTUyYjI0NzQ4OGExNTRlNGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.kuDNgoP6pqVJOkeKjCFSA_cIJntjS4M2fJA-MJy-vrU)
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.