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