How do you launch the JavaScript debugger in Google Chrome?

前端 未结 15 1362
失恋的感觉
失恋的感觉 2020-11-22 03:33

When using Google Chrome, I want to debug some JavaScript code. How can I do that?

相关标签:
15条回答
  • 2020-11-22 04:17

    Shift + Control + I opens the Developer tool window. From bottom-left second image (that looks like the following) will open/hide the console for you:

    0 讨论(0)
  • 2020-11-22 04:18

    From the console in Chrome, you can do console.log(data_to_be_displayed).

    0 讨论(0)
  • 2020-11-22 04:19

    Press the F12 function key in the Chrome browser to launch the JavaScript debugger and then click "Scripts".

    Choose the JavaScript file on top and place the breakpoint to the debugger for the JavaScript code.

    0 讨论(0)
  • 2020-11-22 04:20

    F12 opens the developer panel

    CTRL + SHIFT + C Will open the hover-to-inspect tool where it highlights elements as you hover and you can click to show it in the elements tab.

    CTRL + SHIFT + I Opens the developer panel with console tab

    RIGHT-CLICK > Inspect Right click any element, and click "inspect" to select it in the Elements tab of the Developer panel.

    ESC If you right-click and inspect element or similar and end up in the "Elements" tab looking at the DOM, you can press ESC to toggle the console up and down, which can be a nice way to use both.

    0 讨论(0)
  • 2020-11-22 04:21

    Now google chrome has introduce new feature. By Using this feature You can edit you code in chrome browse. (Permanent change on code location)

    For that Press F12 --> Source Tab -- (right side) --> File System - in that please select your location of code. and then chrome browser will ask you permission and after that code will be sink with green color. and you can modify your code and it will also reflect on you code location (It means it will Permanent change)

    Thanks

    0 讨论(0)
  • 2020-11-22 04:22

    Windows and Linux:

    Ctrl + Shift + I keys to open Developer Tools

    Ctrl + Shift + J to open Developer Tools and bring focus to the Console.

    Ctrl + Shift + C to toggle Inspect Element mode.

    Mac:

    + + I keys to open Developer Tools

    + + J to open Developer Tools and bring focus to the Console.

    + + C to toggle Inspect Element mode.

    Source

    Other shortcuts

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