I've installed the plugin and have now gotten as far as getting the program
to stop at breakpoints. The actual variables are still just $var1,
$var2,... I'm serving the program with emrun but I've used 'python3 -m
http.server 8000' as well. Both produce the same result. It's probably
still worth using but the actual project I'm working on has a lot of
complex data structures that I assume will just show up as more of those
anonymous 32 bit integers. Has anyone had any success with getting a full
debugging environment working for emscripten whether in the browser or not?
I'm familiar with debugging regular C++ code in VSCode and I know Emacs can
be used for that as well. I'm only interested in things that work in a
Linux environment as well.

On Fri, Aug 19, 2022 at 11:00 AM 'Sam Clegg' via emscripten-discuss <
[email protected]> wrote:

> Indeed, source-map only give you line level debugging (i.e. not variables
> or parameter values), but work in all browsers.
>
> Full dwarf debugging (-g) requires the chrome extension.  I thought that
> you must have that already installed since I'm not sure how you would even
> set a breakpoint without that working.
>
> On Thu, Aug 18, 2022 at 11:36 PM Sebastian Theophil <[email protected]>
> wrote:
>
>> IIRC for source level breakpoints you need to enable the experimental
>> support for dwarf debugging in chrome
>>
>> https://developer.chrome.com/blog/wasm-debugging-2020/
>>
>> Von meinem iPhone gesendet
>>
>> Am 19.08.2022 um 06:28 schrieb Gregory Propf <[email protected]>:
>>
>> 
>> I also tried it with "emcc debugtest.cpp -gsource-map --source-map-base=
>> http://localhost:6931/ -o debugtest.js"
>> In this case the breakpoints actually are being honored but the variables
>> are all just identified as $var1, $var2, etc... I've seen this before when
>> trying to debug ClojureScript and eventually abandoned the effort because
>> it wasn't that useful, particularly with complex data structures where I
>> really needed the names of the structure members.
>>
>> On Thu, Aug 18, 2022 at 5:02 PM 'Sam Clegg' via emscripten-discuss <
>> [email protected]> wrote:
>>
>>> Can you make it work with a simple hello world program compiled without
>>> optimizations?  If not it sounds like maybe a bug in either toolchain or in
>>> the debugger plugin.
>>>
>>> If you can't set a breakpoint in a simple hello world program can you
>>> open a bug, and please include the full command line and full program you
>>> are using.
>>>
>>> cheers,
>>> sam
>>>
>>> On Thu, Aug 18, 2022 at 3:52 PM Gregory Propf <[email protected]> wrote:
>>>
>>>> Hello everyone, first post here and a simple (but aggravating) problem
>>>> - No matter what combination of -g flags or other command line tricks I use
>>>> I cannot seem to get Chrome to allow me to step through my C++ code. I can
>>>> add the CPP files and even set breakpoints but the program does not stop
>>>> for them. I'm doing this on Ubuntu 22.04 with the latest version of Chrome.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "emscripten-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/emscripten-discuss/02e05a34-f383-4e39-b051-ff7bdb3ae1c9n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/emscripten-discuss/02e05a34-f383-4e39-b051-ff7bdb3ae1c9n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "emscripten-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_eNCJj_9qnzJfJrYpwkzzLQrVzd-kOnXT2GGB45Mi5Xg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_eNCJj_9qnzJfJrYpwkzzLQrVzd-kOnXT2GGB45Mi5Xg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHO3ahfPE-31Sj22WiRRuMuyy9E9UNvN93D%2B0dVmz-vkuQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHO3ahfPE-31Sj22WiRRuMuyy9E9UNvN93D%2B0dVmz-vkuQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/7AE81AD1-3532-47B4-B401-16164233AB25%40gmail.com
>> <https://groups.google.com/d/msgid/emscripten-discuss/7AE81AD1-3532-47B4-B401-16164233AB25%40gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_UC4m_re92Ar%3DxzsbGtG21sauEa-72CgvNKwK1Xv5cRw%40mail.gmail.com
> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_UC4m_re92Ar%3DxzsbGtG21sauEa-72CgvNKwK1Xv5cRw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHMQb9Ztt_r%2B0UJk6CQMR8vWXm-duT60%3DPLJxP8nak5dQw%40mail.gmail.com.

Reply via email to