www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Debugging WebAssembly with modern tools

reply Paulo Pinto <pjmlp progtools.org> writes:
Chrome now supports source code debugging for WebAssembly.

Maybe something to eventually check for LDC as well.

https://developers.google.com/web/updates/2020/12/webassembly
Dec 11 2020
parent reply Sebastiaan Koppe <mail skoppe.eu> writes:
On Friday, 11 December 2020 at 10:39:54 UTC, Paulo Pinto wrote:
 Chrome now supports source code debugging for WebAssembly.

 Maybe something to eventually check for LDC as well.

 https://developers.google.com/web/updates/2020/12/webassembly
Why wouldnt it already work? It uses dwarf debuginfo, which is already emitted by llvm in the wasm binary.
Dec 11 2020
parent reply Paulo Pinto <pjmlp progtools.org> writes:
On Friday, 11 December 2020 at 21:55:24 UTC, Sebastiaan Koppe 
wrote:
 On Friday, 11 December 2020 at 10:39:54 UTC, Paulo Pinto wrote:
 Chrome now supports source code debugging for WebAssembly.

 Maybe something to eventually check for LDC as well.

 https://developers.google.com/web/updates/2020/12/webassembly
Why wouldnt it already work? It uses dwarf debuginfo, which is already emitted by llvm in the wasm binary.
Either I am doing something wrong, or just adding -g isn't enough to make it work for ldc.
Dec 13 2020
parent reply Sebastiaan Koppe <mail skoppe.eu> writes:
On Sunday, 13 December 2020 at 09:02:53 UTC, Paulo Pinto wrote:
 On Friday, 11 December 2020 at 21:55:24 UTC, Sebastiaan Koppe 
 wrote:
 On Friday, 11 December 2020 at 10:39:54 UTC, Paulo Pinto wrote:
 Chrome now supports source code debugging for WebAssembly.

 Maybe something to eventually check for LDC as well.

 https://developers.google.com/web/updates/2020/12/webassembly
Why wouldnt it already work? It uses dwarf debuginfo, which is already emitted by llvm in the wasm binary.
Either I am doing something wrong, or just adding -g isn't enough to make it work for ldc.
I just tried with ldc 1.24, works like a charm: https://paste.pics/4f5d412af40cef93f89c5e9100730272 I am using dub to build it, has -d-debug as well as -g.
Dec 13 2020
parent Paulo Pinto <pjmlp progtools.org> writes:
On Sunday, 13 December 2020 at 22:41:13 UTC, Sebastiaan Koppe 
wrote:
 On Sunday, 13 December 2020 at 09:02:53 UTC, Paulo Pinto wrote:
 On Friday, 11 December 2020 at 21:55:24 UTC, Sebastiaan Koppe 
 wrote:
 On Friday, 11 December 2020 at 10:39:54 UTC, Paulo Pinto 
 wrote:
 Chrome now supports source code debugging for WebAssembly.

 Maybe something to eventually check for LDC as well.

 https://developers.google.com/web/updates/2020/12/webassembly
Why wouldnt it already work? It uses dwarf debuginfo, which is already emitted by llvm in the wasm binary.
Either I am doing something wrong, or just adding -g isn't enough to make it work for ldc.
I just tried with ldc 1.24, works like a charm: https://paste.pics/4f5d412af40cef93f89c5e9100730272 I am using dub to build it, has -d-debug as well as -g.
Duh, I missed the part about the Chrome extension. Thanks for checking it out.
Dec 18 2020