Javascript remote debugging
Hi,
I'm evalulating Intellij IDEA 8.0.1 and I like what I see. One feature I can't figure out how to enable is the remote javascript debugging.
I watched the Flash movie on the site that shows how to use the debugger, but to no avail.
Here's my setup:
I have Jetty running locally. I can successfully debug Java code from that configuration.
I created a remote debugging configuration and entered the URL to a page running in my local Jetty instance. When I start the debug session the Intellij browser starts, and the page loads correctly in the Intellij web browser.
I then open a .js file in the same project and set breakpoints.
When I click around in the browser, the breakpoints are not being triggered.
What am I doing wrong?
Are there any other movies/documents that explain remote debugging? I haven't found much to go on.
thanks
-- James
Please sign in to leave a comment.
James Cooper wrote:
Do you mean 'are NOT'?
N.
Currently if you are using a remote debug configuration IDEA cannot find a source file by the URL. So in order to debug you need to press "Jump to
source" button in the browser, then IDEA will open source code of the page in an editor and you will be able to put breakpoints in it.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi Nikolay,
Ah, ok. I got it working. My confusion was that the file I wanted to set a breakpoint in was an external .js file. To make this work I had to:
At that point I could remove the breakpoint in the parent page and debug the .js file. It appears that there's currently no way to add a breakpoint inside a .js file without going through the parent page first. Is that true?
Also, I found that if I edited the .js file, I had to "synchronize" the debugged (locked) version of the .js file in the debugger to get the changes to appear. Ideally the debugger would automatically reload those changes if they were reloaded in the intellij web browser.
thanks, it's really great to be able to debug javascript in the same IDE as my java code!
-- James
James Cooper wrote:
Yes, it's true at the moment. We will try to improve usability of remote debugging in the next version.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Nikolay,
I cannot even find where to enter the remote url after clicking on run->edit config->add->application->remote debug. I attached a screenshot of the dialog. Can you tell what I did wrong? Thanks!
BTW I am running IDEA 8.0.1 build 9164.
Attachment(s):
intellij-remote-debug.JPG
You should select "JavaScript Debug" item and then select "Remote" to create a run configuration (see attached screenshot).
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"