Debug a modal dialog (showModalDialog) in IE

前端 未结 4 1888
死守一世寂寞
死守一世寂寞 2021-02-03 19:48

I want to debug (examine DOM, use the interactive JS console, etc) part of a web application that is inside a modal dialog that was created by showModalDialog().

4条回答
  •  Happy的楠姐
    2021-02-03 20:41

    You can now put the word debugger without quotes in your javascript.

    IE and Chrome should both break on it as if you had set a breakpoint on it. Make sure its on a line by itself. Press F12 to open the browser debugger and then refresh your page or trigger the event to run your javascript and the debugger should automatically display the code with the breakpoint set.

提交回复
热议问题