NicolasPetton / Indium

A JavaScript development environment for Emacs
https://indium.readthedocs.io
GNU General Public License v3.0
1.13k stars 61 forks source link

Multiple connections? #221

Open sandinmyjoints opened 5 years ago

sandinmyjoints commented 5 years ago

This is a fantastic package -- thanks for it @NicolasPetton! I got it up and running with both Node apps running Docker and client-side apps bundled with webpack with only an hour or two of effort, most of it on getting sourcemaps to work with webpack (our webpack configurations are fairly complex, but in the end, the changes I had to make to the default mapping were actually tiny!).

Anyway, I was wondering if there are any plans to support multiple connections. It'd be great to have one debugging session open for the server and another for the client, rather than having to switch between them.

NicolasPetton commented 5 years ago

William Bert notifications@github.com writes:

This is a fantastic package -- thanks for it @NicolasPetton! I got it up and running with both Node apps running Docker and client-side apps bundled with webpack with only an hour or two of effort, most of it on getting sourcemaps to work with webpack (our webpack configurations are fairly complex, but in the end, the changes I had to make to the default mapping were actually tiny!).

Great to hear!

Anyway, I was wondering if there are any plans to support multiple connections. It'd be great to have one debugging session open for the server and another for the client, rather than having to switch between them.

Not at the moment (although that something I would like to have myself, so I might start working on it one day). There's nothing preventing multiple connections, it's just that the Emacs package does not support it.

Nico

sandinmyjoints commented 5 years ago

Thanks for the reply, sounds good!

Separate question: I've noticed that when I have a chrome debugging session open, and then I do indium-launch with the same chrome configuration, a new chrome tab is opened, but at least sometimes, indium continues to communicate with the previous tab. Is there something in the chrome debugging protocol that identifies which tab to communicate with? Maybe that's this? https://chromedevtools.github.io/devtools-protocol/tot/Target

NicolasPetton commented 4 years ago

William Bert notifications@github.com writes:

Separate question: I've noticed that when I have a chrome debugging sessino open, and then I do indium-launch with the same chrome configuration, a new chrome tab is opened, but at least sometimes, indium continues to communicate with the previous tab. Is there something in the chrome debugging protocol that identifies which tab to communicate with? Maybe that's this? https://chromedevtools.github.io/devtools-protocol/tot/Target

Indium always connects to the active tab in Chrome, not the last open one. Could that be why?

sandinmyjoints commented 4 years ago

Hm, what defines active? In my experience, it does not always communicate with the most recently launched tab (which has focus -- I'm not switching tabs manually or otherwise touching the browser). It's not a big problem -- I run window.alert("it's me") in the repl and whichever tab speaks up is the one indium is talking to :)

NicolasPetton commented 4 years ago

That's really odd, it's an issue I never have. The active tab is the current tab in Chrome, and it always work for me.

What version of Chrome/Chromium are you using?

jZhangTk commented 4 years ago

I'd also like to see multiple connections since the project I'm working on has multiple services and sometimes I need to debug more than one service at the same time.