<div dir="ltr"><div>Running Firefox with both --jsdebugger and --wait-for-jsdebugger can help hitting breakpoints earlier, but it will still miss files loaded before DevTools command-line handler.</div><div>I don't think this will work for nsSearchService.js, because it is loaded before DevTools handler.<br></div><div><br></div><div>See <a href="https://groups.google.com/forum/#!topic/mozilla.dev.platform/J51qDMLUKA0">https://groups.google.com/forum/#!topic/mozilla.dev.platform/J51qDMLUKA0</a> <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 13, 2018 at 6:38 PM, <a href="mailto:sfcheng@gmail.com">sfcheng@gmail.com</a> <span dir="ltr"><<a href="mailto:sfcheng@gmail.com" target="_blank">sfcheng@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<div><span></span>That doesn't work. I put a debugger statement in nsSearchService.js, for example. Then I launch with --jsdebugger flag. It wasn't able to pause. </div>
<div><br></div><hr style="width:210px;height:1px" size="1" color="#b5c4df" align="left"><span class="">
<div><span><div style="FONT-SIZE:10pt;FONT-FAMILY:verdana;MARGIN:10px">
<div>Rest Regards,</div>
<div>Shanfeng Cheng</div><div><a href="mailto:sfcheng@gmail.com" target="_blank">sfcheng@gmail.com</a></div></div></span></div>
</span><blockquote style="margin-top:0px;margin-bottom:0px;margin-left:0.5em"><div> </div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT:8px;PADDING-LEFT:8px;FONT-SIZE:12px;FONT-FAMILY:tahoma;COLOR:#000000;BACKGROUND:#efefef;PADDING-BOTTOM:8px;PADDING-TOP:8px"><div><b>From:</b> <a href="mailto:bgrinstead@mozilla.com" target="_blank">Brian Grinstead</a></div><div><b>Date:</b> 2018-07-12 07:13</div><div><b>To:</b> <a href="mailto:sfcheng@gmail.com" target="_blank">sfcheng@gmail.com</a></div><div><b>CC:</b> <a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev</a></div><div><b>Subject:</b> Re: How to step into firefox initialization javascript?</div></div></div><span class=""><div><div>If you put a `debugger;` statement into code and then run with the `-jsdebugger` flag it should pause and let you step into the script.</div>
<div> </div>
<div>Brian</div>
<div> </div>
<div>> On Jul 12, 2018, at 7:07 AM, <a href="mailto:sfcheng@gmail.com" target="_blank">sfcheng@gmail.com</a> wrote:</div>
<div>> </div>
<div>> Hello, everyone,</div>
<div>> </div>
<div>> I know we can use the browser toolbox in firefox to debug and trace browser-level javascript. However, in order to do that, I would have to fire up firefox first and then open browser toolbox from the menu. Then set a breakpoint in the file that I want to debug. However, some of the scripts are run during browser initialization. It would be too late to debug such initialization script using the browser toolbox. Is there anyway to step into such script?</div>
<div>> </div>
<div>> Thanks a lot for help!</div>
<div>> </div>
<div>> </div>
<div>> Rest Regards,</div>
<div>> Shanfeng Cheng</div>
<div>> <a href="mailto:sfcheng@gmail.com" target="_blank">sfcheng@gmail.com</a></div>
<div>> ______________________________<wbr>_________________</div>
<div>> firefox-dev mailing list</div>
<div>> <a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a></div>
<div>> <a href="https://mail.mozilla.org/listinfo/firefox-dev" target="_blank">https://mail.mozilla.org/<wbr>listinfo/firefox-dev</a></div>
<div> </div>
</div></span></blockquote>
</div><br>______________________________<wbr>_________________<br>
firefox-dev mailing list<br>
<a href="mailto:firefox-dev@mozilla.org">firefox-dev@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/firefox-dev" rel="noreferrer" target="_blank">https://mail.mozilla.org/<wbr>listinfo/firefox-dev</a><br>
<br></blockquote></div><br></div>