mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Improve Wasm debug instructions
This commit is contained in:
parent
6b191fcfc2
commit
6e2d7e4a8d
2 changed files with 24 additions and 16 deletions
|
@ -69,10 +69,12 @@
|
|||
<h3>Steps</h3>
|
||||
<ul>
|
||||
<li>
|
||||
In <code>gen_wasm/src/lib.rs</code>, set
|
||||
<code>DEBUG_LOG_SETTINGS.keep_test_binary = true</code>
|
||||
Run
|
||||
<code
|
||||
>ROC_WRITE_FINAL_WASM=1 cargo test-gen-wasm
|
||||
my_test_function_name</code
|
||||
>
|
||||
</li>
|
||||
<li>Run <code>cargo test-gen-wasm my_test_function_name</code></li>
|
||||
<li>
|
||||
Look for the path written to the console for
|
||||
<code>final.wasm</code> and select it in the file picker below
|
||||
|
@ -81,9 +83,6 @@
|
|||
Open the browser DevTools <br />
|
||||
<small> Control+Shift+I or Command+Option+I or F12 </small>
|
||||
</li>
|
||||
<li>
|
||||
If your test is from <code>gen_refcount.rs</code>
|
||||
</li>
|
||||
<li>
|
||||
The debugger should pause just before entering the first Wasm call.
|
||||
Step into a couple of Wasm calls until you reach your test code in
|
||||
|
@ -99,8 +98,8 @@
|
|||
<div class="controls">
|
||||
<div class="row">
|
||||
<label>
|
||||
<input type="checkbox" id="refcount-test">
|
||||
Check box if test is from <code>gen_refcount.rs</code>
|
||||
<input type="checkbox" id="refcount-test" />
|
||||
Check this box if your test is in <code>gen_refcount.rs</code>
|
||||
</label>
|
||||
</div>
|
||||
<div class="row row-file">
|
||||
|
@ -128,7 +127,7 @@
|
|||
} else {
|
||||
localStorage.removeItem("refcount-test");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
button.onclick = function () {
|
||||
if (refcount_checkbox.checked) {
|
||||
|
@ -136,7 +135,7 @@
|
|||
} else {
|
||||
runExpressionTest();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
file_input.onchange = function () {
|
||||
error_box.innerHTML = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue