In PyCharm, how do I debug a JavaScript file that's accessed from a template-driven site?

StackOverflow https://stackoverflow.com/questions/9322172

  •  27-10-2019
  •  | 
  •  

문제

I'm trying to use PyCharm to debug a JavaScript file. When I bring up the debug dialog for the JavaScript file in question, I'm presented with a dialog where I must enter the HTML file that launches the JavaScript file.

Of course, the JavaScript file isn't launched from a static HTML page, but from some Python that uses templates. But it wants a static HTML file to initiate debugging.

Am I missing something, or debugging JavaScript that's invoked from a dynamic page not possible in PyCharm?

도움이 되었습니까?

해결책

In the JavaScript Debug configuration type it's possible to specify any URL that you want, PyCharm will open a browser for you.

In the Debug panel Scripts tab load the script that you want to debug and place the breakpoints in the downloaded file.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top