Avoid stepping through javascript file in Chrome Developer Tools?

后端 未结 5 1581
感情败类
感情败类 2020-12-07 19:05

I am wondering, is there any way to omit a javascript file from Chrome Developer Tools debugger, so it will automatically skip over any function calls made to that script? <

相关标签:
5条回答
  • 2020-12-07 19:14

    Things are a little bit different in the version 51.

    Press F12 then F1. Pick 'Blackboxing' from the menu on the left.

    0 讨论(0)
  • 2020-12-07 19:23

    iSid I would like to point out that as of Chrome 38 you no longer need to enable the devtools experiments. Instead if you go straight to the F12 developer tools -> settings -> general -> sources you will see the last item in there is manage framework blackboxing. The good part is you can setup each framework on it's own line or you can throw together a generic catch all pattern like (firebug|angular|knockout|jquery|bootstrap|modernizr|respond)

    0 讨论(0)
  • 2020-12-07 19:30

    Under Chrome v68, while debugging on a .js file, use left click to blackbox script:

    https://developer.chrome.com/devtools/docs/blackboxing

    0 讨论(0)
  • 2020-12-07 19:31

    The "Step Out" button can be used to quickly get you out of the JQuery code.

    0 讨论(0)
  • 2020-12-07 19:38

    UPDATE 2
    There has been an improvement in user flow of this feature in latest versions of chrome. Please refer to https://developer.chrome.com/devtools/docs/blackboxing

    UPDATE 1
    Since Chrome version 38, you no longer have to enable Developer Tools experiments.

    Below details are only for history

    This is possible now in chrome version 30+.

    1. Enable "Enable Developer Tools experiments" from chrome://flags/#enable-devtools-experiments. (Yes, you need to type that where you type the URL)
    2. Relaunch chrome
    3. Click on settings icon in Chrome Developer Tools
    4. Go to Experiments section. Notice the WARNING ;) and then tick Enable frameworks debugging support. (You also might want to try Show step-in candidates while debugging)
    5. Now, close Chrome Dev Tools and again open it.
    6. Click on settings icon in Chrome Developer Tools
    7. In general section you will find "Skip stepping through sources with particular names". Tick that and provide regex for the javascript file names which you want to skip stepping into.

    Skip stepping into certain javascript files

    Source: Tips and Tricks: Ignoring library code while debugging in Chrome

    0 讨论(0)
提交回复
热议问题