From V3.0 onwards, Mobile Debug supports web debugging and debugger breakpoints:


  1. This points to support
  2. The arguments to support
  3. Scope support



Debugger function diagram:






Function is introduced

This points to the









The arguments to support

Arguments. callee has been changed. If you debug a project without strict mode and use arguments.callee to build functionality, this will cause a logical exception to the page you are debugging.




scope

With the Console panel, view the breakpoint location local variable, nothing wrong!




This is a real break point! The js statement behind the breakpoint is blocked!!




As shown in the figure below, when the breakpoint is at line 15, the variable c has been assigned and c=2 is fetched from the console.

Debugging Interface

Debugger menu panel introduction

Exit the debugger
Single step
Step into the
That button


How do I enable the Debugger function

By default, web debugging does not enable debugger support. You can configure this in Settings debug Injection Rule Settings


How to hit breakpoints

  1. Use debugger syntax in your code


  2. Working with the JS file in network, right click View in View, and then click the tag at the left line number



Please note that

  1. If the Mobile Debug interface is not opened, the debugger breakpoint will not be hit and will be ignored automatically.

  2. In the debugger state, the client is in the “suspended animation” state, indicating that you cannot operate the web page. If you are prompted whether to end the web page, wait. Exit the debugger or close the debugging interface to end the suspended animation.

  3. Mobile Debug does not support the following scenarios:

    1. Module created by worker;

    2. Eval dynamically created code blocks;

    3. New Function dynamically created code block;

    4. Javascript statements embedded in HTML.

  4. The implementation of the debugger function formats the JS source file. The line and col provided by the Error object caught in your code correspond to the formatted line and column, which do not correspond to the location in your JS source file.