Thanks for the infos! I tried to reproduce it with your pseudo code but had 
no luck. I can see breakable lines in the MainLoopCB file. Would you mind 
filing a bug at crbug.com against the Platform>DevTools>WebAssembly 
component?

If possible, please include a minimal self-contained reproducer, such as 
the two required sources and something like a makefile to build.  You might 
also attach a binary if that's not too big!

On Tuesday, January 12, 2021 at 8:03:37 PM UTC+1 Brian Gavin wrote:

> yes, all of the line numbers are grayed out, but I can see all of my 
> source files.   I am using -g for linking and compiling -O0 only when 
> linking.   I can set breakpoints in my main() function and any code in 
> other files called by the main() function.
>
> My code has a file main.cpp that holds int main()  if I hack my code and a 
> callback function for an event or my main loop callback I can set 
> breakpoints for code in main.cpp but as soon as my code calls code outside 
> of main.cpp.   I can not set breakpoints in the code.
>
> pseudo code
>
> void MainLoopCB(void* data)
> {
>      // If this function is not in main.cpp breakpoints will not work
>      ClassInOtherFile();
> }
>
> int main()
> {
>      // Breakpoints work here and variables can be inspected
>      int i=0;
>      int sum=0;
>      for(i=0;i<20;i++)
>      {
>            sum++;
>      }
>        emscripten_set_main_loop_arg(MainLoopCB,0,nullptr,true);
>
>       return 0;
> }
> On Monday, January 11, 2021 at 9:57:38 AM UTC-5 [email protected] wrote:
>
>> Hi Brian!
>>
>> By unable do you mean that all the line numbers in the sources panel are 
>> grayed out? But you can see all source files? Are you using those flags 
>> both for compiling and linking?
>>
>> Cheers,
>> Philip
>> On Friday, January 8, 2021 at 4:22:05 PM UTC+1 Brian Gavin wrote:
>>
>>> Hello,
>>> I am excited to see the new ability to set breakpoints and view 
>>> variables in Chrome.   
>>>
>>> When I do a simple project with about 5 source files it works fairly 
>>> well, but when I try to debug my large project with 100s of files.   I am 
>>> unable to set breakpoints in the callback functions such as mouse events 
>>> and our callback function that draws to the screen at 60 fps( 
>>> emscripten_set_main_loop_arg ).   Is there a linker/compiler setting that 
>>> helps this.   I am using -g -O0 -fno-inline as flags for debugging.   I am 
>>> using emscripten SDK 2.0.11 with Chrome Canary.
>>>
>>> Thanks,
>>> Brian Gavin
>>>
>>

-- 
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/0d648f8b-17cc-4a02-9345-1a1a3532751fn%40googlegroups.com.

Reply via email to