1

Let me 1st explain my setup. I am trying to build a website using Django as backend framework and with Twitter bootstrap as frontend framework (using the django frontend)

My env is CentOS 5.9 with Eclipse Kepler with Pydev, JSDT, WDT plugins (Python 2.7, Django 1.4+).

I am able to debug Django Python files (views.py) using --noreload (argument to manage.py) using the pydev perspective.

But how do I debug the frontend Javascript from Eclipse (I know I can use Chrome/Firefox tools, but I would like to debug and use JS autocomplete feature of Eclipse) that is served from a Django server? To make things simple, I am running the Django manage.py from a terminal (unless someone can tell me how to debug Django and JS at same time from Eclipse?)

I know I can debug static pages using chrome dev tool with Eclipse, but I am looking for way to debug pages (JS, CSS) served by Django.

Thanks for the help :) Let me know if you think there is a better way to debug JS.

Community
  • 1
  • 1
amulllb
  • 3,036
  • 7
  • 50
  • 87
  • I've never seen this done before. Webkit does have an interface for external debuggers to attach to, so it's possible that something like this exists. Consider looking into https://code.google.com/p/chromedevtools/, which I found by DuckDuckGo'ing "ecliplse webkit debugger" – acjay Mar 19 '14 at 21:39
  • @acjohnson55, Thanks. I already looked into it. I think Chromedevtool just starts its own server and it doesn't use an existing server (like my Django server). I looked into defining a new server in Eclipse, but its asking "Select the server type" and for that I need to install a server plugin. I really think they should have the ability to use an external server just by providing server and port #. – amulllb Mar 19 '14 at 21:48

1 Answers1

0
  1. Start a server on localhost
  2. open a browser and navigate to your local server.
  3. Use the built-in debugging capabilities of your browser.
Rohit Poudel
  • 1,793
  • 2
  • 20
  • 24
Wolf Pauw
  • 1
  • 1
  • I think the OP has specified that they do not want to debug using the in built browser capabilities. – alex Aug 15 '17 at 11:46
  • It appears you're right. But OP can use the autocomplete feature of Eclipse from within Eclipse and debug the rendered JS with the browser toolset, and lose nothing. The features are not related. Autocomplete does not affect the debugging experience, and vice versa. – Wolf Pauw Aug 15 '17 at 11:53
  • Great, perhaps you should improve your answer to provide more information on your suggested approach. – alex Aug 15 '17 at 11:54