Thread overview
Debugging WebAssembly with modern tools
Dec 11, 2020
Paulo Pinto
Dec 11, 2020
Sebastiaan Koppe
Dec 13, 2020
Paulo Pinto
Dec 13, 2020
Sebastiaan Koppe
Dec 18, 2020
Paulo Pinto
December 11, 2020
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
December 11, 2020
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.
December 13, 2020
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.



December 13, 2020
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.
December 18, 2020
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.