How does JavaScript debugging in Firefox work?

I never managed to use the JavaScript debugging feature, and am trying again now with version 95.105. I setup a remote Firefox Run/Debug configuration. I start the debugging in IntelliJ, and in the debug panel see "Waiting for connection on port 7,812". Then in Firefox, I load the page I want to debug, and right click, and choose Debug in IDEA. This gives me a dialog with the message "Close Firefox. A copy of Firefox is already open. Only one copy of Firefox can be open at a time." I don't get it... I am in Firefox, and would like the IntelliJ plugin to connect to IntelliJ. Am I missing something?

Alex

9 comments

Looks like IDEA cannot connect to Firefox. When you start JavaScript Debug configuration the message in the debug view should change from 'Waiting for
connection' to 'Connected to Firefox'. May be it is related to the problem desribed at http://www.jetbrains.net/devnet/message/5263210#5263210.

I never managed to use the JavaScript debugging feature, and am trying again now with version 95.105. I setup a remote Firefox Run/Debug configuration. I start the debugging in IntelliJ, and in the debug panel see "Waiting for connection on port 7,812". Then in Firefox, I load the page I want to debug, and right click, and choose Debug in IDEA. This gives me a dialog with the message "Close Firefox. A copy of Firefox is already open. Only one copy of Firefox can be open at a time." I don't get it... I am in Firefox, and would like the IntelliJ plugin to connect to IntelliJ. Am I missing something?

Alex

---
Original message URL: http://www.jetbrains.net/devnet/message/5263208#5263208



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Hi Nikolay,

I didn't get any of those nasty NS_ERROR_NOT_AVAILABLE with the latest EAP. But let's see I understand this correctly:

1. I already have a Firefox running.
2. I start the debugging in IntelliJ, and get the message "Waiting for connection on port 7,812".
3. Now I need to tell Firefox to connect to IntelliJ. If that Firefox was started by IntelliJ, it would connect by itself, but since it isn't, I assume this is what "Debug in IDEA" does.

Is this correct? If it is, it doesn't work for me. It seems that doing "Debug in IDEA" from Firefox tries to start another Firefox.

Alex

0

Actually after step 2 IDEA should connect to Firefox automatically so you don't need to perform step 3.

Hi Nikolay,

I didn't get any of those nasty NS_ERROR_NOT_AVAILABLE with the latest EAP. But let's see I understand this correctly:

1. I already have a Firefox running.
2. I start the debugging in IntelliJ, and get the message "Waiting for connection on port 7,812".
3. Now I need to tell Firefox to connect to IntelliJ. If that Firefox was started by IntelliJ, it would connect by itself, but since it isn't, I assume this is what "Debug in IDEA" does.

Is this correct? If it is, it doesn't work for me. It seems that doing "Debug in IDEA" from Firefox tries to start another Firefox.

Alex

---
Original message URL: http://www.jetbrains.net/devnet/message/5263756#5263756



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Nikolay,

But if I started Firefox (not IntelliJ started Firefox), how would the add-on know when it needs to connect to IntelliJ? Wouldn't I need to tell the add-on "now there is an IntelliJ listening, try to connect to it"?

Alex

0

When you start JavaScript debug configuration from IDEA it runs Firefox executable with a special command line paramater which is handled by Firefox
Extension.

Nikolay,

But if I started Firefox (not IntelliJ started Firefox), how would the add-on know when it needs to connect to IntelliJ? Wouldn't I need to tell the add-on "now there is an IntelliJ listening, try to connect to it"?

Alex

---
Original message URL: http://www.jetbrains.net/devnet/message/5263957#5263957



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Nikolay,

Yes, I understand this. But does that mean that to be able to connect to IntelliJ, Firefox always needs to be started by IntelliJ? Say I have a Firefox that I started last week, and now want to debug something. I can't just tell Firefox "now connect to IntelliJ"; I would have to exit Firefox, and let IntelliJ restart it. Is that right?

Alex

0

Alex,

'Debug in IDEA' is supposed to do what you want. It should start a debug session in IDEA and connect it to the current Firefox instance.

Nikolay,

Yes, I understand this. But does that mean that to be able to connect to IntelliJ, Firefox always needs to be started by IntelliJ? Say I have a Firefox that I started last week, and now want to debug something. I can't just tell Firefox "now connect to IntelliJ"; I would have to exit Firefox, and let IntelliJ restart it. Is that right?

Alex

---
Original message URL: http://www.jetbrains.net/devnet/message/5264074#5264074



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Nikolay,

Alright; then we're on the same page. And the issue for me, is that when I run that "Debug in IDEA" in Firefox, I get a dialog telling me that Firefox is already started, as if it tried to start another Firefox. I assume that you're not seeing this?

Alex

0

Yes, it works for me.

Nikolay,

Alright; then we're on the same page. And the issue for me, is that when I run that "Debug in IDEA" in Firefox, I get a dialog telling me that Firefox is already started, as if it tried to start another Firefox. I assume that you're not seeing this?

Alex

---
Original message URL: http://www.jetbrains.net/devnet/message/5264086#5264086



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.