-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avs_pc: add wasm source map so avs debugging in chrome is possible (#72)
- Loading branch information
1 parent
b1fd422
commit 2c782f1
Showing
3 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# AVS WASM Debugging | ||
|
||
## Develop | ||
|
||
When working with the web app it is sometimes helpful to debug the AVS. | ||
To do this you need to create the WASM file with debug information. | ||
|
||
### Build WASM with source map | ||
|
||
This creates wasm file with debug information | ||
|
||
```bash | ||
$ make dist_wasm WASM_DEBUG=1 | ||
``` | ||
|
||
### Link avs project ro wire_webapp | ||
|
||
After you have built the wasm, link your local build of `@wireapp/avs` to your local `wire-webapp` like: | ||
|
||
```bash | ||
$ cd cd build/dist/wasm/ | ||
$ yarn link | ||
``` | ||
Use `yarn link @wireapp/avs` in the root directory of your local `wire-webapp`. | ||
|
||
If that doesn't work, there is still the hard way ;) | ||
|
||
Add `@wireapp/avs` directly in the `package.json` of `wire-webapp` like | ||
|
||
```json | ||
{ | ||
"dependencies": { | ||
"@wireapp/avs": "file:../wire-avs/build/dist/wasm/" | ||
} | ||
} | ||
``` | ||
|
||
### Debugging WebAssembly in Chrome | ||
|
||
To get the debug information you need a Chrome extension: | ||
Install the [C/C++ DevTools Support (DWARF) Chrome extension](https://chromewebstore.google.com/detail/cc++-devtools-support-dwa/pdcpmagijalfljmkmjngeonclgbbannb) | ||
|
||
![DevTools](./assets/chrome_develop_tool.png "DevTools") | ||
|
||
Have fun! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters